From 579677008f0c586b3566332f5f27d9eb7a5e10e6 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 7 Jan 2016 15:23:45 -0500 Subject: [PATCH] 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 --- legacy/elementary/src/lib/elm_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_config.c b/legacy/elementary/src/lib/elm_config.c index 2f86c1cc47..bd1b9ff509 100644 --- a/legacy/elementary/src/lib/elm_config.c +++ b/legacy/elementary/src/lib/elm_config.c @@ -900,7 +900,7 @@ elm_config_profile_derived_add(const char *profile, const char *derive_options) Elm_Config_Derived *derived; derived = _elm_config_derived_load(_elm_profile); - if (!derived) derived = calloc(1, sizeof(derived)); + if (!derived) derived = calloc(1, sizeof(Elm_Config_Derived)); if (derived) { Elm_Config_Derived_Profile *dp = calloc(1, sizeof(Elm_Config_Derived_Profile));