Skip to content

Commit

Permalink
doh: no need to if() before free()
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed May 3, 2024
1 parent c816d67 commit 03771ab
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/doh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,12 +1237,9 @@ static CURLcode Curl_doh_decode_httpsrr(unsigned char *rrval, size_t len,
return CURLE_OK;
err:
if(lhrr) {
if(lhrr->target)
free(lhrr->target);
if(lhrr->echconfiglist)
free(lhrr->echconfiglist);
if(lhrr->val)
free(lhrr->val);
free(lhrr->target);
free(lhrr->echconfiglist);
free(lhrr->val);
free(lhrr);
}
return CURLE_OUT_OF_MEMORY;
Expand Down

0 comments on commit 03771ab

Please sign in to comment.