Fix updateinfo_set_version 04/137804/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 10 Jul 2017 00:36:45 +0000 (09:36 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 10 Jul 2017 00:36:45 +0000 (09:36 +0900)
- Fix to check right pointer

Change-Id: I3f6f110ee799281ec2119368845203bf4ef10064
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/package_manager.c

index 5e9a954..3cf4bde 100644 (file)
@@ -1708,7 +1708,7 @@ API int package_manager_updateinfo_set_version(package_updateinfo_request_h pkg_
        if (request->updateinfo_handle->version)
                free(request->updateinfo_handle->version);
        request->updateinfo_handle->version = strdup(version);
-       if (request->updateinfo_handle->pkgid == NULL)
+       if (request->updateinfo_handle->version == NULL)
                return package_manager_error(PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
 
        return PACKAGE_MANAGER_ERROR_NONE;