mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
codecanalyzer: don't try to free uninitialized pointers
xml_files_path and hex_files_path variable are not initialized. There are chances that corruption happens when uninitialized variables are freed, so init them to NULL before use. https://bugzilla.gnome.org/show_bug.cgi?id=748351
This commit is contained in:
parent
f700eaef8f
commit
1f58db52bf
1 changed files with 4 additions and 6 deletions
|
@ -960,15 +960,13 @@ static gboolean
|
||||||
analyzer_create_dirs ()
|
analyzer_create_dirs ()
|
||||||
{
|
{
|
||||||
const gchar *user_cache_dir;
|
const gchar *user_cache_dir;
|
||||||
gchar *xml_files_path;
|
gchar *xml_files_path = NULL;
|
||||||
gchar *hex_files_path;
|
gchar *hex_files_path = NULL;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
user_cache_dir = g_get_user_cache_dir ();
|
user_cache_dir = g_get_user_cache_dir ();
|
||||||
if (!user_cache_dir) {
|
if (!user_cache_dir)
|
||||||
ret = FALSE;
|
return FALSE;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->analyzer_home = g_build_filename (user_cache_dir, "codecanalyzer", NULL);
|
ui->analyzer_home = g_build_filename (user_cache_dir, "codecanalyzer", NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue