Skip to content

Commit

Permalink
Fix some Coverity-reported issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Jun 8, 2024
1 parent 39065c7 commit 23e947e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cups/oauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ cupsOAuthGetAuthorizationCode(
}

if (polldata.fd < 0)
return (NULL);
goto done;

polldata.events = POLLIN | POLLERR | POLLHUP;

Expand Down Expand Up @@ -538,7 +538,8 @@ cupsOAuthGetAuthorizationCode(
done:

// Free strings, close the listen socket, and return...
httpAddrClose(&addr, polldata.fd);
if (polldata.fd >= 0)
httpAddrClose(&addr, polldata.fd);

free(client_id);
free(code_verifier);
Expand Down Expand Up @@ -866,11 +867,10 @@ cupsOAuthGetTokens(
if (access_expires)
*access_expires = access_expvalue;

cupsJSONDelete(response);

// Return whatever we got...
done:

cupsJSONDelete(response);
cupsJWTDelete(jwt);
free(nonce);
free(request);
Expand Down

0 comments on commit 23e947e

Please sign in to comment.