projects
/
platform
/
core
/
appfw
/
librua.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82d5d59
)
Add logic to check ret value
80/153180/2
author
Seungha Son
<seungha.son@samsung.com>
Thu, 28 Sep 2017 05:08:24 +0000
(14:08 +0900)
committer
Semun Lee
<semun.lee@samsung.com>
Tue, 10 Oct 2017 04:31:12 +0000
(
04:31
+0000)
__insert_history() and __update_history() to return,
but that stored value is overwritten before it can be used
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I76f7632594c3a1a1507dd04fa98c47d60f95fbf3
src/rua_internal.c
patch
|
blob
|
history
diff --git
a/src/rua_internal.c
b/src/rua_internal.c
index
8ce257c
..
808dd96
100644
(file)
--- a/
src/rua_internal.c
+++ b/
src/rua_internal.c
@@
-306,6
+306,11
@@
API int rua_usr_db_add_history(struct rua_rec *rec, uid_t uid)
r = __update_history(db, rec);
else
r = __insert_history(db, rec);
+ if (r == -1) {
+ LOGE("Failed insert or update history");
+ sqlite3_close_v2(db);
+ return -1;
+ }
r = rua_dbus_send_update_signal(ADD);
if (r == -1) {