[vlc-commits] [Git][videolan/vlc][master] access: cache: free all entries on failure
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Sep 23 16:14:39 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
5437c799 by Marvin Scholz at 2025-09-23T15:10:36+00:00
access: cache: free all entries on failure
While unlikely, if the url strdup failed but the username strdup
succeeds, this would have leaked the username entry.
Fix CID 1665566
- - - - -
1 changed file:
- modules/access/cache.c
Changes:
=====================================
modules/access/cache.c
=====================================
@@ -53,8 +53,7 @@ vlc_access_cache_entry_New(void *context, const char *url, const char *username,
entry->username = username ? strdup(username) : NULL;
if (!entry->url || (entry->username == NULL) != (username == NULL))
{
- free(entry->url);
- free(entry);
+ vlc_access_cache_entry_Delete(entry);
return NULL;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5437c799db795ca9c0e322771643bc177cf4b864
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5437c799db795ca9c0e322771643bc177cf4b864
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list