diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-01 14:07:58 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-01 14:07:58 +0000 |
commit | 9a2da2e034900cb5d08429d896cfd93dea119dbe (patch) | |
tree | 29bbc2b7c550ada8e0449fc6188d25a74e011f86 /fstrm-0.6.1-Possible-resource-leak-fix.patch | |
parent | 56de271d7c24f6d8835932f3e38cea2910633302 (diff) |
automatic import of fstrmopeneuler24.03_LTS
Diffstat (limited to 'fstrm-0.6.1-Possible-resource-leak-fix.patch')
-rw-r--r-- | fstrm-0.6.1-Possible-resource-leak-fix.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/fstrm-0.6.1-Possible-resource-leak-fix.patch b/fstrm-0.6.1-Possible-resource-leak-fix.patch new file mode 100644 index 0000000..bde2fca --- /dev/null +++ b/fstrm-0.6.1-Possible-resource-leak-fix.patch @@ -0,0 +1,40 @@ +From 1499d3e2715bad67588b5c0b6c02865eeb65aa16 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> +Date: Fri, 8 Jan 2021 17:43:03 +0100 +Subject: [PATCH 3/3] Possible resource leak fix + +34. fstrm-0.6.0/libmy/argv.c:2238: alloc_fn: Storage is returned from allocation function "realloc". +35. fstrm-0.6.0/libmy/argv.c:2238: var_assign: Assigning: "argv" = storage returned from "realloc(argv, 8UL * max)". +37. fstrm-0.6.0/libmy/argv.c:2254: var_assign: Assigning: "argv_p" = "argv". +47. fstrm-0.6.0/libmy/argv.c:2229: leaked_storage: Variable "argv_p" going out of scope leaks the storage it points to. +48. fstrm-0.6.0/libmy/argv.c:2229: leaked_storage: Variable "argv" going out of scope leaks the storage it points to. +--- + libmy/argv.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libmy/argv.c b/libmy/argv.c +index 16dca73..0b28026 100644 +--- a/libmy/argv.c ++++ b/libmy/argv.c +@@ -2226,7 +2226,7 @@ static void file_args(const char *path, argv_t *grid, + *argv_p = string_copy(line); + if (*argv_p == NULL) { + *okay_bp = ARGV_FALSE; +- return; ++ goto cleanup; + } + + argv_p++; +@@ -2257,7 +2257,8 @@ static void file_args(const char *path, argv_t *grid, + + /* now do the list */ + do_list(grid, arg_c, argv, queue_list, queue_head_p, queue_tail_p, okay_bp); +- ++ ++cleanup: + /* now free up the list */ + for (argv_p = argv; argv_p < argv + arg_c; argv_p++) { + free(*argv_p); +-- +2.26.3 + |