notify/queue.c: fixed potential null pointer dereference
This commit is contained in:
parent
9de2e02418
commit
850df3fc87
1 changed files with 2 additions and 2 deletions
|
|
@ -65,8 +65,8 @@ queue_t init_queue() {
|
||||||
|
|
||||||
queue_t q = malloc(sizeof(struct __queue));
|
queue_t q = malloc(sizeof(struct __queue));
|
||||||
|
|
||||||
init(q);
|
if (q)
|
||||||
|
init(q);
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue