freebsd11_network: Add another missing NULL check to taskqueue_free.
Also add missing \ns to the new printfs.
This commit is contained in:
@@ -213,7 +213,7 @@ _callout_stop_safe(struct callout *c, int safe)
|
|||||||
MutexLocker locker(sLock);
|
MutexLocker locker(sLock);
|
||||||
|
|
||||||
if (c == NULL) {
|
if (c == NULL) {
|
||||||
printf("_callout_stop_safe called with NULL callout");
|
printf("_callout_stop_safe called with NULL callout\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,11 @@ taskqueue_start_threads(struct taskqueue **taskQueue, int count, int priority,
|
|||||||
void
|
void
|
||||||
taskqueue_free(struct taskqueue *taskQueue)
|
taskqueue_free(struct taskqueue *taskQueue)
|
||||||
{
|
{
|
||||||
|
if (taskQueue == NULL) {
|
||||||
|
printf("taskqueue_free called with NULL taskqueue\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* lock and drain list? */
|
/* lock and drain list? */
|
||||||
taskQueue->tq_flags &= ~TQ_FLAGS_ACTIVE;
|
taskQueue->tq_flags &= ~TQ_FLAGS_ACTIVE;
|
||||||
if (!taskQueue->tq_fast)
|
if (!taskQueue->tq_fast)
|
||||||
@@ -248,7 +253,7 @@ taskqueue_drain(struct taskqueue *taskQueue, struct task *task)
|
|||||||
cpu_status status;
|
cpu_status status;
|
||||||
|
|
||||||
if (taskQueue == NULL) {
|
if (taskQueue == NULL) {
|
||||||
printf("taskqueue_drain called with NULL taskqueue");
|
printf("taskqueue_drain called with NULL taskqueue\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user