summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-11-06 14:11:16 +0100
committerColin Walters <walters@verbum.org>2013-11-06 17:02:43 -0500
commitca53db5614d57969908cdd8a99bd34394c9e969d (patch)
tree8ff222dc32628eb723026173518cd3f3f9008efa
parentf861ba48955b6c3a3a05cdadae510695db3b5a99 (diff)
downloadlibgsystem-ca53db5614d57969908cdd8a99bd34394c9e969d.tar.gz
GSSubprocess: remove unnecessary NULL check (trivial)
This fixes a warning found during Coverity scan. Error: REVERSE_INULL (CWE-476): [#def5] libgsystem/gsystem-subprocess.c:949: deref_ptr_in_call: Dereferencing pointer "context". libgsystem/gsystem-subprocess-context.c:330:3: deref_parm: Directly dereferencing parameter "self". libgsystem/gsystem-subprocess.c:960: check_after_deref: Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--gsystem-subprocess.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gsystem-subprocess.c b/gsystem-subprocess.c
index 655b1b8..4ec680f 100644
--- a/gsystem-subprocess.c
+++ b/gsystem-subprocess.c
@@ -957,8 +957,7 @@ gs_subprocess_simple_run_sync (const char *cwd,
ret = TRUE;
out:
- if (context)
- g_object_unref (context);
+ g_object_unref (context);
if (proc)
g_object_unref (proc);
return ret;