Fix illegal accesses 95/153195/1
authorSeungha Son <seungha.son@samsung.com>
Thu, 28 Sep 2017 05:27:47 +0000 (14:27 +0900)
committerSeungha Son <seungha.son@samsung.com>
Thu, 28 Sep 2017 05:29:06 +0000 (14:29 +0900)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Ib278102cdd1821a993e7e8c14b0a007b0159951d

src/rua.c

index ff921b6..1fbab49 100644 (file)
--- a/src/rua.c
+++ b/src/rua.c
@@ -229,10 +229,11 @@ API int rua_history_get_rec(struct rua_rec *rec, char **table, int nrows, int nc
        db_result = table + ((row + 1) * ncols);
 
        tmp = db_result[RUA_COL_PKGNAME];
-       if (tmp)
+       if (tmp) {
                rec->pkg_name = tmp;
+               LOGI("get rec pkg_name %s", rec->pkg_name);
+       }
 
-       LOGI("get rec pkg_name %s", rec->pkg_name);
        tmp = db_result[RUA_COL_APPPATH];
        if (tmp)
                rec->app_path = tmp;