Resolve possible null pointer dereference
[channels/urbdrc/client/isoch_queue.c:124] -> [channels/urbdrc/client/isoch_queue.c:126]: (warning) Either the condition 'if(isoch)' is redundant or there is possible null pointer dereference: isoch.
@@ -120,11 +120,13 @@ static int isoch_queue_unregister_data(ISOCH_CALLBACK_QUEUE* queue, ISOCH_CALLBA
}
queue->isoch_num--;
+ if (isoch)
+ {
/* free data info */
isoch->out_data = NULL;
- if (isoch)
zfree(isoch);
+ }
return 1; /* unregistration successful */
}
