From 599fb20e0b56e97861e181f34bb37ede6a39305c Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 28 Dec 2015 22:50:32 +0100 Subject: [PATCH] [cache] Fix return values in cache_artwork_get_impl --- src/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cache.c b/src/cache.c index 8d8463c7..1fe5b2c1 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1215,6 +1215,7 @@ cache_artwork_get_impl(struct cache_command *cmd) if (!cmd->arg.evbuf) { DPRINTF(E_LOG, L_CACHE, "Error: Artwork evbuffer is NULL\n"); + ret = -1; goto error_get; } @@ -1222,6 +1223,7 @@ cache_artwork_get_impl(struct cache_command *cmd) if (ret < 0) { DPRINTF(E_LOG, L_CACHE, "Out of memory for artwork evbuffer\n"); + ret = -1; goto error_get; } @@ -1241,7 +1243,7 @@ cache_artwork_get_impl(struct cache_command *cmd) sqlite3_finalize(stmt); sqlite3_free(query); - return -1; + return ret; #undef Q_TMPL }