- Fix wrong pointer casting
- From API reference, get property value must be release using free
Change-Id: Ibf8643e497a2a89bc47bd81b598e879f99169bc9
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
_E("Failed to get result : %d", status);
return UPDATE_CONTROL_ERROR_INVALID_OPERATION;
}
-
_I("Success to get result : %d", status);
+
+ *value = malloc(sizeof(int));
+ if (!*value) {
+ _E("Failed to allocate memory");
+ return UPDATE_CONTROL_ERROR_OUT_OF_MEMORY;
+ }
+
*(int *)(*value) = status;
return UPDATE_CONTROL_ERROR_NONE;
default: