glib/gio/xdgmime
Philip Withnall ad0532f2bf
xdgmimeglob: Fix a memory leak on a duplicate-entry path
Rather than `strdup()`ing strings when passing them into
`_xdg_glob_list_append()`, `strdup()` them *inside* the function
instead.

This avoids a leak in the case that the list entry (tuple of `data` and
`mime_type`) already exists in the list.

This has been upstreamed as
https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/36.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-04-12 18:45:52 +01:00
..
.gitignore gio/ docs/reference/gio Merged gio-standalone into glib. 2007-11-26 16:13:05 +00:00
meson.build Fix symbol visibility macros on Windows 2022-10-13 20:53:56 -04:00
xdgmime.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmime.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimealias.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimealias.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimecache.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimecache.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeglob.c xdgmimeglob: Fix a memory leak on a duplicate-entry path 2024-04-12 18:45:52 +01:00
xdgmimeglob.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeicon.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeicon.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeint.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeint.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimemagic.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimemagic.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeparent.c xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00
xdgmimeparent.h xdgmime: Update to upstream commit c2c814d4051f232 2023-12-04 13:13:13 +00:00