"read_filter_list()" and "save_filter_list()" mallocate the path string
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 6 Aug 2005 18:42:07 +0000 (18:42 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 6 Aug 2005 18:42:07 +0000 (18:42 +0000)
that they return through the "pref_path_return" argument; make it a
"char **", as a pointer to a "char *" is passed to it, and the caller
has to free that.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15249 f5534014-38df-0310-8fa8-9805f1628bb7

filters.c
filters.h

index 86f570c520ad1e86740eab97d62602384e934d91..e8aa3cb33facff30b0816fad75866a261a31e7e5 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -78,7 +78,7 @@ static GList *display_filters = NULL;
 #define INIT_BUF_SIZE  128
 
 void
-read_filter_list(filter_list_type_t list, const char **pref_path_return,
+read_filter_list(filter_list_type_t list, char **pref_path_return,
     int *errno_return)
 {
   const char *ff_name;
@@ -423,7 +423,7 @@ remove_from_filter_list(filter_list_type_t list, GList *fl_entry)
  * and "*errno_return" is set to the error.
  */
 void
-save_filter_list(filter_list_type_t list, const char **pref_path_return,
+save_filter_list(filter_list_type_t list, char **pref_path_return,
     int *errno_return)
 {
   const gchar *ff_name;
index 239b775679b164f433ca2e9f23a6027467de68cd..d059c8cc8027207d6818e78999143aeef4204ced 100644 (file)
--- a/filters.h
+++ b/filters.h
@@ -47,7 +47,7 @@ typedef struct {
  * the file we tried to read - it should be freed by our caller -
  * and "*errno_return" is set to the error.
  */
-void read_filter_list(filter_list_type_t list, const char **pref_path_return,
+void read_filter_list(filter_list_type_t list, char **pref_path_return,
     int *errno_return);
 
 /*
@@ -75,5 +75,5 @@ void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
  * the file we tried to read - it should be freed by our caller -
  * and "*errno_return" is set to the error.
  */
-void save_filter_list(filter_list_type_t list, const char **pref_path_return,
+void save_filter_list(filter_list_type_t list, char **pref_path_return,
     int *errno_return);