summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-01-07 15:23:45 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-01-07 15:23:45 -0500
commita6fb564f38278f83fb14291357c1902a80970ca0 (patch)
tree01d27429686ffbac0b2eb1a3e01921ce9ef4a5ca
parent2f718de3b95b715fd965dedb93f0bc58bf9c8c00 (diff)
elementary: Fix potential sizeof mismatch
Coverity CID1347398 reports that this could potentially be a non-portable assumption resulting in a sizeof mismatch. Fix this by using the actual structure type in the call to calloc. Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/elm_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 2f86c1cc4..bd1b9ff50 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -900,7 +900,7 @@ elm_config_profile_derived_add(const char *profile, const char *derive_options)
900 Elm_Config_Derived *derived; 900 Elm_Config_Derived *derived;
901 901
902 derived = _elm_config_derived_load(_elm_profile); 902 derived = _elm_config_derived_load(_elm_profile);
903 if (!derived) derived = calloc(1, sizeof(derived)); 903 if (!derived) derived = calloc(1, sizeof(Elm_Config_Derived));
904 if (derived) 904 if (derived)
905 { 905 {
906 Elm_Config_Derived_Profile *dp = calloc(1, sizeof(Elm_Config_Derived_Profile)); 906 Elm_Config_Derived_Profile *dp = calloc(1, sizeof(Elm_Config_Derived_Profile));