diff options
-rwxr-xr-x | tool/sp_initdb.c | 9 |
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; |