Fix invalid check logic 81/212281/1
authorJusung Son <jusung07.son@samsung.com>
Tue, 20 Aug 2019 02:25:21 +0000 (11:25 +0900)
committerJusung Son <jusung07.son@samsung.com>
Tue, 20 Aug 2019 02:26:26 +0000 (11:26 +0900)
Change-Id: I0b3d3a57919b297230d6651cc75fc483bffe0599
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
notification/src/notification_internal.c

index bee6eb3..f4b3fc1 100644 (file)
@@ -1838,6 +1838,7 @@ EXPORT_API int notification_get_extension_data(notification_h noti, const char *
 {
        char *ret_str;
        bundle *args;
+       int ret;
 
        if (noti == NULL || key == NULL || value == NULL)
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
@@ -1847,8 +1848,8 @@ EXPORT_API int notification_get_extension_data(notification_h noti, const char *
 
        args = noti->args;
 
-       bundle_get_str(args, key, &ret_str);
-       if (ret_str == NULL)
+       ret = bundle_get_str(args, key, &ret_str);
+       if (ret != BUNDLE_ERROR_NONE)
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        *value = _create_bundle_from_bundle_raw((bundle_raw *)ret_str);