freebsd11_network: Add another missing NULL check to taskqueue_free.

Also add missing \ns to the new printfs.
This commit is contained in:
Augustin Cavalier
2018-07-05 15:46:02 -04:00
parent c7eabc40dc
commit a00c8c4491
2 changed files with 7 additions and 2 deletions
@@ -213,7 +213,7 @@ _callout_stop_safe(struct callout *c, int safe)
MutexLocker locker(sLock);
if (c == NULL) {
printf("_callout_stop_safe called with NULL callout");
printf("_callout_stop_safe called with NULL callout\n");
return 0;
}
@@ -220,6 +220,11 @@ taskqueue_start_threads(struct taskqueue **taskQueue, int count, int priority,
void
taskqueue_free(struct taskqueue *taskQueue)
{
if (taskQueue == NULL) {
printf("taskqueue_free called with NULL taskqueue\n");
return;
}
/* lock and drain list? */
taskQueue->tq_flags &= ~TQ_FLAGS_ACTIVE;
if (!taskQueue->tq_fast)
@@ -248,7 +253,7 @@ taskqueue_drain(struct taskqueue *taskQueue, struct task *task)
cpu_status status;
if (taskQueue == NULL) {
printf("taskqueue_drain called with NULL taskqueue");
printf("taskqueue_drain called with NULL taskqueue\n");
return;
}