projects
/
platform
/
core
/
system
/
storaged.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8703f8a
)
Fix resource leak - mnt_new_table/mnt_free_table
34/257934/1
author
INSUN PYO
<insun.pyo@samsung.com>
Fri, 7 May 2021 01:00:09 +0000
(10:00 +0900)
committer
INSUN PYO
<insun.pyo@samsung.com>
Fri, 7 May 2021 01:01:26 +0000
(10:01 +0900)
Change-Id: Ifd1c0466ed9b6003dcc0e168ed2432cf5c3f3fa1
src/block/block.c
patch
|
blob
|
history
diff --git
a/src/block/block.c
b/src/block/block.c
index
f0e5b0b
..
667c414
100644
(file)
--- a/
src/block/block.c
+++ b/
src/block/block.c
@@
-2424,13
+2424,18
@@
static int get_internal_storage_number(void)
return -EPERM;
}
temp = mnt_fs_get_srcpath(fs);
- if (!temp)
+ if (!temp) {
+ mnt_free_table(t);
return -EPERM;
+ }
name = strrchr(temp, '/');
- if (!name)
+ if (!name) {
+ mnt_free_table(t);
return -EPERM;
+ }
name++;
+
/* Boot from USB is not handled */
if (!is_emulator()) {
if (!fnmatch(MMC_PATH, temp, 0))