Skip to content

Commit

Permalink
[curl] free f when non NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
rkd77 committed Jul 24, 2023
1 parent a142489 commit c09b5da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ remsock(SockInfo *f)
{
//fprintf(stderr, "remsock f=%p\n", f);

if (f && f->sockfd) {
set_handlers(f->sockfd, NULL, NULL, NULL, NULL);
if (f) {
if (f->sockfd) {
set_handlers(f->sockfd, NULL, NULL, NULL, NULL);
}
mem_free(f);
}
}
Expand Down

0 comments on commit c09b5da

Please sign in to comment.