From 76cb1d4b72907e484e018d24b8db40e8cd420d1f Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 4 Feb 2016 16:51:36 +0100 Subject: [PATCH] dispatcher: drop a useless condition The request->scripts are allocated in handle_action() and request_free() is only called after that, so it never sees it NULL. Coverity knows: CID 59385 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking request->scripts suggests that it may be null, but it has already been dereferenced on all paths leading to the check. --- callouts/nm-dispatcher.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c index a0201ff4c1..ece5ff2d75 100644 --- a/callouts/nm-dispatcher.c +++ b/callouts/nm-dispatcher.c @@ -206,8 +206,7 @@ request_free (Request *request) g_free (request->action); g_free (request->iface); g_strfreev (request->envp); - if (request->scripts) - g_ptr_array_free (request->scripts, TRUE); + g_ptr_array_free (request->scripts, TRUE); g_slice_free (Request, request); }