summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-12-11 09:27:10 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2019-12-11 09:27:10 +0900
commitab67611c65f3bc665a0121e4a84d0d8d5bddf822 (patch)
tree973a61c4f77958e104ee8f607f14d9abbacd06a4
parent271b56889fed170cc05f048e63c44b4e928d7964 (diff)
eina_inline: Fixed a potential dangling pointer
Summary: fixed by null handling Test Plan: N/A Reviewers: Hermet, YOhoho, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10850
-rw-r--r--src/lib/eina/eina_inline_value.x6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/eina/eina_inline_value.x b/src/lib/eina/eina_inline_value.x
index a1a6314..8d3457c 100644
--- a/src/lib/eina/eina_inline_value.x
+++ b/src/lib/eina/eina_inline_value.x
@@ -150,7 +150,11 @@ eina_value_flush(Eina_Value *value)
150 } 150 }
151 else if (type == EINA_VALUE_TYPE_STRING) 151 else if (type == EINA_VALUE_TYPE_STRING)
152 { 152 {
153 if (value->value.ptr) free(value->value.ptr); 153 if (value->value.ptr)
154 {
155 free(value->value.ptr);
156 value->value.ptr = NULL;
157 }
154 } 158 }
155 else if (type->value_size > 8) 159 else if (type->value_size > 8)
156 eina_value_inner_free(type->value_size, mem); 160 eina_value_inner_free(type->value_size, mem);