Open
Conversation
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
3278046 to
78f7098
Compare
ejoerns
pushed a commit
that referenced
this pull request
Jan 28, 2025
This fixes an error leaking if error happen in r_nbd_run_server(). Fixes: ==7101==ERROR: LeakSanitizer: detected memory leaks Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fb183cd0891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7fb18379314a in g_malloc (/usr/lib/libglib-2.0.so.0+0x6314a) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) #2 0x7fb1837b2475 in g_slice_alloc0 (/usr/lib/libglib-2.0.so.0+0x82475) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) #3 0x7fb1837740a4 (/usr/lib/libglib-2.0.so.0+0x440a4) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#4 0x7fb183774835 in g_error_new_valist (/usr/lib/libglib-2.0.so.0+0x44835) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#5 0x7fb183774a81 in g_set_error (/usr/lib/libglib-2.0.so.0+0x44a81) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#6 0x55c569403615 in r_nbd_run_server ../src/nbd.c:943 rauc#7 0x55c569327de4 in main ../src/main.c:2984 rauc#8 0x7fb182a0ce07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#9 0x7fb182a0cecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#10 0x55c5692eed14 in _start (/home/gportay/src/rauc/build/rauc+0x17ad14) (BuildId: fce67367819006bb3a0f97f5d3784a86063668bf) Indirect leak of 37 byte(s) in 1 object(s) allocated from: #0 0x7fb183cd0891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7fb182a6f438 (/usr/lib/libc.so.6+0x88438) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) #2 0x7fb1837e5143 in g_vasprintf (/usr/lib/libglib-2.0.so.0+0xb5143) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) #3 0x7fb1837b44d3 in g_strdup_vprintf (/usr/lib/libglib-2.0.so.0+0x844d3) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#4 0x7fb183774826 in g_error_new_valist (/usr/lib/libglib-2.0.so.0+0x44826) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#5 0x7fb183774a81 in g_set_error (/usr/lib/libglib-2.0.so.0+0x44a81) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#6 0x55c569403615 in r_nbd_run_server ../src/nbd.c:943 rauc#7 0x55c569327de4 in main ../src/main.c:2984 rauc#8 0x7fb182a0ce07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#9 0x7fb182a0cecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#10 0x55c5692eed14 in _start (/home/gportay/src/rauc/build/rauc+0x17ad14) (BuildId: fce67367819006bb3a0f97f5d3784a86063668bf) SUMMARY: AddressSanitizer: 53 byte(s) leaked in 2 allocation(s). Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.