sched/wqueue: do work_cancel when worker is not null
@@ -118,7 +118,10 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
/* Remove the entry from the timer and work queue. */
+ if (work->worker != NULL)
+ {
work_cancel(qid, work);
+ }
/* Initialize the work structure. */
