Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[BugFix] tagcache_search() must be closed with tagcache_search_finish()

fix a couple of places where this could be left open

Change-Id: I43ac7d6b26d728c11f96e5415710341d60f07ab8

+7
+3
apps/plugins/pictureflow/pictureflow.c
··· 1218 1218 { 1219 1219 if (rb->button_get(false) > BUTTON_NONE) { 1220 1220 if (confirm_quit()) 1221 + { 1222 + rb->tagcache_search_finish(tcs); 1221 1223 return ERROR_USER_ABORT; 1224 + } 1222 1225 else 1223 1226 { 1224 1227 rb->lcd_clear_display();
+4
apps/tagcache.c
··· 970 970 971 971 bool tagcache_find_index(struct tagcache_search *tcs, const char *filename) 972 972 { 973 + /* NOTE: on ret==true you need to call tagcache_search_finish(tcs) yourself */ 973 974 int idx_id; 974 975 975 976 if (!tc_stat.ready) ··· 1721 1722 1722 1723 bool tagcache_search(struct tagcache_search *tcs, int tag) 1723 1724 { 1725 + /* NOTE: call tagcache_search_finish(&tcs) when finished or BAD things may happen (TM) */ 1724 1726 struct tagcache_header tag_hdr; 1725 1727 struct master_header master_hdr; 1726 1728 int i; ··· 3936 3938 if (clfd < 0) 3937 3939 { 3938 3940 logf("failure to open changelog"); 3941 + tagcache_search_finish(tcs); 3939 3942 return false; 3940 3943 } 3941 3944 ··· 3944 3947 if ( (tcs->masterfd = open_master_fd(&myhdr, false)) < 0) 3945 3948 { 3946 3949 close(clfd); 3950 + tagcache_search_finish(tcs); 3947 3951 return false; 3948 3952 } 3949 3953 }