mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-07 03:17:13 +08:00
Fix potential Null pointer dereference in timer.c (#2759)
This commit is contained in:
parent
5cd98b7b9e
commit
7647d50a3e
@ -85,6 +85,9 @@ seaf_timer_new (TimerCB func,
|
||||
timer->user_data = user_data;
|
||||
|
||||
timer->event = evtimer_new (seaf->ev_base, timer_callback, timer);
|
||||
if (timer->event == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
evtimer_add (timer->event, &timer->tv);
|
||||
|
||||
return timer;
|
||||
|
Loading…
Reference in New Issue
Block a user