updateDevice() remove element from the list when realloc fails
This commit is contained in:
parent
9066896195
commit
cd506a67e1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue