diff options
Diffstat (limited to 'epan/uat.c')
-rw-r--r-- | epan/uat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/uat.c b/epan/uat.c index e94bb2d9bd..cf891685ae 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -154,18 +154,24 @@ void uat_remove_record_idx(uat_t* uat, guint idx) { } +/* The returned filename was g_malloc()'d so the caller must free it */ gchar* uat_get_actual_filename(uat_t* uat, gboolean for_writing) { + gchar* pers_fname = get_persconffile_path(uat->filename, TRUE, for_writing); if (! for_writing ) { gchar* data_fname = get_datafile_path(uat->filename); if ((! file_exists(pers_fname) ) && file_exists(data_fname)) { + g_free(pers_fname); return data_fname; } + + g_free(data_fname); } if ((! file_exists(pers_fname) ) && (! for_writing ) ) { + g_free(pers_fname); return NULL; } |