Made nvr_close() no longer attempt to free a NULL NVR pointer.
This commit is contained in:
@@ -1010,6 +1010,7 @@ nvr_at_close(void *priv)
|
||||
timer_disable(&local->update_timer);
|
||||
timer_disable(&nvr->onesec_time);
|
||||
|
||||
if (nvr != NULL) {
|
||||
if (nvr->fn != NULL)
|
||||
free(nvr->fn);
|
||||
|
||||
@@ -1017,6 +1018,7 @@ nvr_at_close(void *priv)
|
||||
free(nvr->data);
|
||||
|
||||
free(nvr);
|
||||
}
|
||||
|
||||
if (nvr_at_inited == 1)
|
||||
nvr_at_inited = 0;
|
||||
|
Reference in New Issue
Block a user