From 8f8f1fd0ad3030ab319f6c5e4c4c146189c9d968 Mon Sep 17 00:00:00 2001 From: Lyndon Brown <jnqnfe@gmail.com> Date: Thu, 23 Dec 2021 22:01:17 +0000 Subject: [PATCH] kwallet: fix invalid free --- modules/keystore/kwallet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/keystore/kwallet.c b/modules/keystore/kwallet.c index 0aea93671b9d..6407f9901961 100644 --- a/modules/keystore/kwallet.c +++ b/modules/keystore/kwallet.c @@ -236,7 +236,10 @@ key2values( char* psz_key, vlc_keystore_entry* p_entry ) goto end; if ( url.i_port && asprintf( &p_entry->ppsz_values[KEY_PORT], "%d", url.i_port) == -1 ) + { + p_entry->ppsz_values[KEY_PORT] = NULL; goto end; + } if ( url.psz_path && !( p_entry->ppsz_values[KEY_PATH] = strdup( url.psz_path ) ) ) goto end; -- GitLab