summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_abstract_content.c
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2020-03-10 10:25:10 -0400
committerChristopher Michael <devilhorns@comcast.net>2020-03-10 10:25:10 -0400
commite34837f28d3ec03da584ffce8648a8ede4294aa8 (patch)
treef7950c11fe1820ae005cec6e343ccc82c10147b3 /src/lib/eina/eina_abstract_content.c
parent2747c84ec159dff12c0854c34f20dd662bcbe7b3 (diff)
eina_abstract_content: Fix dereference before null check
Fixes Coverity CID1420337
Diffstat (limited to '')
-rw-r--r--src/lib/eina/eina_abstract_content.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/eina/eina_abstract_content.c b/src/lib/eina/eina_abstract_content.c
index 2392681084..73a77c00df 100644
--- a/src/lib/eina/eina_abstract_content.c
+++ b/src/lib/eina/eina_abstract_content.c
@@ -138,12 +138,10 @@ eina_content_new(Eina_Slice data, const char *type)
138 138
139 _eina_content_ref(content); 139 _eina_content_ref(content);
140 return content; 140 return content;
141
141err: 142err:
142 if (content) 143 free(content->data.mem);
143 { 144 content->data.mem = NULL;
144 free(content->data.mem);
145 content->data.mem = NULL;
146 }
147 return NULL; 145 return NULL;
148} 146}
149 147