Fix the prevent issue
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 20 Apr 2015 09:36:43 +0000 (18:36 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 20 Apr 2015 09:36:43 +0000 (18:36 +0900)
invalid checking

[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I40c7dcf9608b513620e2d4c3adc704be4088e9a4

widget_provider_app/src/client.c

index 9921489..2e6066e 100644 (file)
@@ -1281,11 +1281,14 @@ PAPI int widget_provider_app_send_updated_event(const char *id, int idx, int x,
                int len;
 
                len = strlen(id) + strlen(".desc") + 3;
+
                desc_name = malloc(len);
-               if (!len) {
+               if (!desc_name) {
+                       ErrPrint("malloc: %d\n", errno);
                        free(uri);
                        return WIDGET_ERROR_OUT_OF_MEMORY;
                }
+
                snprintf(desc_name, len, "%s.desc", id);
        }