From 44ecc80b41ccb820369cbc59de7f4d9c50058c55 Mon Sep 17 00:00:00 2001 From: Sangpyo Kim Date: Mon, 8 Apr 2013 16:40:14 +0900 Subject: [PATCH] remove resource leak detected by prevent [Title] remove resource leak [Issue#] Prevent 50668 [Problem] N/a [Cause] N/A [Solution] remove resource leak [Developer] sangpyo7.kim Change-Id: I0459c9dee7e31ac3c35f6a0b5b416c3840e4d119 --- src/favorites_bookmark.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/favorites_bookmark.c b/src/favorites_bookmark.c index d548b5d..dea1373 100644 --- a/src/favorites_bookmark.c +++ b/src/favorites_bookmark.c @@ -471,6 +471,7 @@ bookmark_list_h _favorites_bookmark_get_folder_list(void) } FAVORITES_LOGE("sqlite3_step is failed"); _favorites_finalize_bookmark_db(stmt); + _favorites_free_bookmark_list(m_list); return NULL; } @@ -1341,8 +1342,10 @@ int _set_full_tree_to_html_recur(int parent_id, FILE *fp, int depth) int ret = _get_list_by_folder(parent_id, &child_list); - if (ret != FAVORITES_ERROR_NONE) + if (ret != FAVORITES_ERROR_NONE) { + _favorites_free_bookmark_list(child_list); return FAVORITES_ERROR_DB_FAILED; + } int i = 0; int j = 0; -- 2.7.4