Displaying 2 results from an estimated 2 matches for "bc7ded3".
Did you mean:
b177ed3
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix file descriptors leak
file descriptors are closed when not in use
Signed-off-by: Imran Zaman <imran.zaman at intel.com>
---
extlinux/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/extlinux/main.c b/extlinux/main.c
index 09740bd..bc7ded3 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -580,6 +580,7 @@ int ext2_fat_install_file(const char *path, int devfd, struct stat *rst)
goto bail;
}
+ close(fd);
free(file);
free(oldfile);
free(c32file);
@@ -797,6 +798,8 @@ static char * get_default_subvol(char *...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...to avoid memory
leak, and ease of use in future as well
Signed-off-by: Imran Zaman <imran.zaman at intel.com>
---
extlinux/main.c | 50 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 17 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index bc7ded3..74f8d1f 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -779,7 +779,7 @@ static char * get_default_subvol(char * rootdir, char * subvol)
struct btrfs_ioctl_search_key *sk = &args.key;
struct btrfs_ioctl_search_header *sh;
int ret, i;
- int fd;
+ int fd = -1;
str...