]> git.sesse.net Git - vlc/blobdiff - modules/misc/sqlite.c
LUA: make one byte room for the nul terminator after iconv()
[vlc] / modules / misc / sqlite.c
index 6aad0279e24287a51b14f7a503bd2ad0e4299b5b..360577f447289abb69f5bd86e3323a21b8551301 100644 (file)
@@ -451,9 +451,10 @@ static int CommitTransaction( sql_t* p_sql )
         msg_Warn( p_sql, "sqlite3 error: %d: %s",
                   sqlite3_errcode( p_sql->p_sys->db ),
                   sqlite3_errmsg( p_sql->p_sys->db ) );
-        vlc_mutex_unlock( &p_sql->p_sys->trans_lock );
         i_ret = VLC_EGENERIC;
     }
+    else
+        vlc_mutex_unlock( &p_sql->p_sys->trans_lock );
     vlc_mutex_unlock( &p_sql->p_sys->lock );
     return i_ret;
 }