From: Julien Desfossez Date: Mon, 24 Feb 2014 21:34:09 +0000 (-0500) Subject: fix: unchecked pointer before strcmp X-Git-Tag: v0.3~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7d69680f4d19e93b44a2eafec672e03b642e7993;p=lttngtop.git fix: unchecked pointer before strcmp Signed-off-by: Julien Desfossez --- diff --git a/src/iostreamtop.c b/src/iostreamtop.c index e0df4ba..e4da1dd 100644 --- a/src/iostreamtop.c +++ b/src/iostreamtop.c @@ -124,7 +124,7 @@ void insert_file(struct processtop *proc, int fd) if (parent) { tmp_parent = g_ptr_array_index( parent->process_files_table, fd); - if (tmp_parent && tmp->name && + if (tmp_parent && tmp->name && tmp_parent->name && (strcmp(tmp->name, tmp_parent->name)) != 0) tmp->name = strdup(tmp_parent->name); }