Skip to content
Permalink
Browse files Browse the repository at this point in the history
updateDevice() remove element from the list when realloc fails
  • Loading branch information
miniupnp committed Dec 18, 2018
1 parent 9066896 commit cd506a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions minissdpd/minissdpd.c
Expand Up @@ -318,6 +318,7 @@ updateDevice(const struct header * headers, time_t t)
if(!tmp) /* allocation error */
{
syslog(LOG_ERR, "updateDevice() : memory allocation error");
*pp = p->next; /* remove "p" from the list */
free(p);
return 0;
}
Expand Down

0 comments on commit cd506a6

Please sign in to comment.