summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtool/sp_initdb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tool/sp_initdb.c b/tool/sp_initdb.c
index 216f326..4d4e727 100755
--- a/tool/sp_initdb.c
+++ b/tool/sp_initdb.c
@@ -249,11 +249,16 @@ static int __init_db(void)
info_size = ARRAY_SIZE(wearable_info);
break;
default:
- printf("syspopup info doesn't exists\n");
- return -1;
+ info = NULL;
+ break;
}
free(profile);
+ if (info == NULL) {
+ printf("Syspopup info doesn't exist\n");
+ return -1;
+ }
+
ret = __open_db();
if (ret < 0)
return -1;