changeset 1088:8c7cf8e29325

Fix minor memory leak in a_UIcmd_search_dialog
author Jorge Arellano Cid <jcid@dillo.org>
date Sat, 09 May 2009 09:53:26 -0400
parents 1f3e4f17a41a
children 5e31d36910b3
files src/uicmd.cc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/uicmd.cc	Sat May 09 09:19:17 2009 +0100
+++ b/src/uicmd.cc	Sat May 09 09:53:26 2009 -0400
@@ -829,11 +829,12 @@
  */
 void a_UIcmd_search_dialog(void *vbw)
 {
-   const char *query, *url_str;
+   const char *query;
 
    if ((query = a_Dialog_input("Search the Web:"))) {
-      url_str = UIcmd_make_search_str(query);
+      char *url_str = UIcmd_make_search_str(query);
       a_UIcmd_open_urlstr(vbw, url_str);
+      dFree(url_str);
    }
 }