Skip to content

Commit

Permalink
Don't leak the error object
Browse files Browse the repository at this point in the history
[357268.621800] systemd[1]: Stopping polkit.service - Authorization Manager...
[357268.623321] polkitd[15601]: Handling SIGTERM
[357268.623321] polkitd[15601]: Shutting down
[357268.629022] polkitd[15601]: Exiting with code 0
[357268.748206] polkitd[15601]: =================================================================
[357268.748455] polkitd[15601]: ==15601==ERROR: LeakSanitizer: detected memory leaks
[357268.748455] polkitd[15601]: Direct leak of 48 byte(s) in 3 object(s) allocated from:
[357268.749382] polkitd[15601]:     #0 0x0000004a1a33 in malloc (/usr/lib/polkit-1/polkitd+0x4a1a33) (BuildId: a927b98f2ddc1b57773bec4e0f8a537fe46632b1)
[357268.749382] polkitd[15601]:     #1 0x7fe21ebe5039 in g_malloc (/lib64/libglib-2.0.so.0+0x47039) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     #2 0x7fe21ebfe4d4 in g_slice_alloc (/lib64/libglib-2.0.so.0+0x604d4) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     #3 0x7fe21ebfe5c4 in g_slice_alloc0 (/lib64/libglib-2.0.so.0+0x605c4) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#4 0x7fe21ebc6910  (/lib64/libglib-2.0.so.0+0x28910) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#5 0x7fe21ebc70a4 in g_error_new_valist (/lib64/libglib-2.0.so.0+0x290a4) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#6 0x7fe21ebc72e0 in g_set_error (/lib64/libglib-2.0.so.0+0x292e0) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#7 0x7fe21ee50b52  (/lib64/libgio-2.0.so.0+0x103b52) (BuildId: d06dc1cc6f8ddbb3cda89ef05ecf83d6fe037ae7)
[357268.749382] polkitd[15601]:     polkit-org#8 0x000000508a88 in ensure_all_files /root/polkit/build/../src/polkitbackend/polkitbackendactionpool.c:572:18
[357268.749382] polkitd[15601]:     polkit-org#9 0x0000005097c1 in polkit_backend_action_pool_get_all_actions /root/polkit/build/../src/polkitbackend/polkitbackendactionpool.c:456:3
[357268.749382] polkitd[15601]:     polkit-org#10 0x0000004e80fd in server_handle_enumerate_actions /root/polkit/build/../src/polkitbackend/polkitbackendauthority.c:689:13
[357268.749382] polkitd[15601]:     polkit-org#11 0x0000004e80fd in server_handle_method_call /root/polkit/build/../src/polkitbackend/polkitbackendauthority.c:1326:5
[357268.749382] polkitd[15601]:     polkit-org#12 0x7fe21ee26195  (/lib64/libgio-2.0.so.0+0xd9195) (BuildId: d06dc1cc6f8ddbb3cda89ef05ecf83d6fe037ae7)
[357268.749382] polkitd[15601]:     polkit-org#13 0x7fe21ebe4e5c  (/lib64/libglib-2.0.so.0+0x46e5c) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#14 0x7fe21ebde60b  (/lib64/libglib-2.0.so.0+0x4060b) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#15 0x7fe21ec3eb37  (/lib64/libglib-2.0.so.0+0xa0b37) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749382] polkitd[15601]:     polkit-org#16 0x7fe21ebe46f6 in g_main_loop_run (/lib64/libglib-2.0.so.0+0x466f6) (BuildId: c18bb9dc5295ff894f6098fa33e9ba39341c5bc1)
[357268.749797] polkitd[15601]:     polkit-org#17 0x0000004e3619 in main /root/polkit/build/../src/polkitbackend/polkitd.c:298:3
[357268.749797] polkitd[15601]:     polkit-org#18 0x7fe21e71a447 in __libc_start_call_main (/lib64/libc.so.6+0x3447) (BuildId: f3ac204eaa4ceed81438c80e80998209f828bb1a)
[357268.749797] polkitd[15601]:     polkit-org#19 0x7fe21e71a50a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x350a) (BuildId: f3ac204eaa4ceed81438c80e80998209f828bb1a)
[357268.749797] polkitd[15601]:     polkit-org#20 0x000000401c04 in _start (/usr/lib/polkit-1/polkitd+0x401c04) (BuildId: a927b98f2ddc1b57773bec4e0f8a537fe46632b1)

Follow-up for 9958c25.
  • Loading branch information
mrc0mmand authored and jrybar-rh committed Nov 6, 2024
1 parent 5cce296 commit b709b69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/polkitbackend/polkitbackendactionpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ ensure_all_files (PolkitBackendActionPool *pool)
if (error != NULL)
{
g_warning ("Error enumerating files in %s: %s", dir_name, error->message);
g_error_free (error);
}
else
{
Expand Down

0 comments on commit b709b69

Please sign in to comment.