View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007642 | GNUnet | namestore service | public | 2023-01-29 23:39 | 2024-02-29 22:46 |
Reporter | ulfvonbelow | Assigned To | schanzen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Git master | ||||
Target Version | 0.19.4 | Fixed in Version | 0.19.4 | ||
Summary | 0007642: Memory leak in parse_recordline in src/namestore/gnunet-namestore.c | ||||
Description | A copy (cp) of the line is leaked. Puzzlingly enough, care was taken to free it in the case of errors... but not in the case of regular operation. | ||||
Steps To Reproduce | ./configure --enable-sanitizer make make install make check | ||||
Additional Information | Patch attached. | ||||
Tags | memory-leak, patch | ||||
Attached Files | 0001-NAMESTORE-fix-memory-leak-in-parse_recordline.patch (889 bytes)
From abb547a78f5c3a0d41efc4b4044c563829d07244 Mon Sep 17 00:00:00 2001 From: ulfvonbelow <strilen@tilde.club> Date: Sun, 29 Jan 2023 06:42:56 -0600 Subject: [PATCH] NAMESTORE: fix memory leak in parse_recordline. --- src/namestore/gnunet-namestore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 7288db902..0329c9c63 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c @@ -464,8 +464,10 @@ parse_recordline (const char *line) _ ("Invalid record data for type %s: `%s'.\n"), GNUNET_GNSRECORD_number_to_typename (record.record_type), tok); + GNUNET_free (cp); return GNUNET_SYSERR; } + GNUNET_free (cp); r = GNUNET_malloc (sizeof(struct RecordSetEntry) + record.data_size); r->next = *head; -- 2.38.1 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2023-01-29 23:39 | ulfvonbelow | New Issue | |
2023-01-29 23:39 | ulfvonbelow | Tag Attached: bug | |
2023-01-29 23:39 | ulfvonbelow | Tag Attached: memory-leak | |
2023-01-29 23:39 | ulfvonbelow | Tag Attached: patch | |
2023-01-29 23:39 | ulfvonbelow | File Added: 0001-NAMESTORE-fix-memory-leak-in-parse_recordline.patch | |
2023-02-06 06:02 | schanzen | Assigned To | => schanzen |
2023-02-06 06:02 | schanzen | Status | new => resolved |
2023-02-06 06:02 | schanzen | Resolution | open => fixed |
2023-02-06 06:02 | schanzen | Fixed in Version | => 0.19.4 |
2023-02-06 06:19 | schanzen | Target Version | => 0.19.4 |
2023-06-01 20:26 | schanzen | Note Added: 0020226 | |
2023-06-01 20:26 | schanzen | Status | resolved => closed |
2024-02-29 22:46 | Christian Grothoff | Tag Detached: bug |