notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa49542
)
mcd, fix memory leaks
author
kub
<derkub@gmail.com>
Fri, 12 Mar 2021 21:09:17 +0000
(22:09 +0100)
committer
kub
<derkub@gmail.com>
Fri, 12 Mar 2021 21:09:17 +0000
(22:09 +0100)
pico/cd/cdd.c
patch
|
blob
|
blame
|
history
pico/cd/mcd.c
patch
|
blob
|
blame
|
history
diff --git
a/pico/cd/cdd.c
b/pico/cd/cdd.c
index
8fa16e1
..
fd78c35
100644
(file)
--- a/
pico/cd/cdd.c
+++ b/
pico/cd/cdd.c
@@
-450,7
+450,7
@@
int cdd_unload(void)
pm_close(cdd.toc.tracks[0].fd);
cdd.toc.tracks[0].fd = NULL;
if (cdd.toc.tracks[0].fname)
- free(cdd.toc.tracks[0].f
d
);
+ free(cdd.toc.tracks[0].f
name
);
cdd.toc.tracks[0].fname = NULL;
}
@@
-473,7
+473,7
@@
int cdd_unload(void)
pm_close(cdd.toc.tracks[i].fd);
cdd.toc.tracks[i].fd = NULL;
if (cdd.toc.tracks[i].fname)
- free(cdd.toc.tracks[i].f
d
);
+ free(cdd.toc.tracks[i].f
name
);
cdd.toc.tracks[i].fname = NULL;
/* detect single file images */
diff --git
a/pico/cd/mcd.c
b/pico/cd/mcd.c
index
ef21ca6
..
559fca7
100644
(file)
--- a/
pico/cd/mcd.c
+++ b/
pico/cd/mcd.c
@@
-24,6
+24,7
@@
PICO_INTERNAL void PicoInitMCD(void)
PICO_INTERNAL void PicoExitMCD(void)
{
+ cdd_unload();
}
PICO_INTERNAL void PicoPowerMCD(void)