Blame SOURCES/wget-1.19.5-covscan-important-issues.patch

11f80c
From b24351183ec574f81c729cbb3286aceaee3f03c8 Mon Sep 17 00:00:00 2001
11f80c
From: Tomas Hozza <thozza@redhat.com>
11f80c
Date: Mon, 30 Jul 2018 12:20:27 +0200
11f80c
Subject: [PATCH 1/6] * src/ftp.c (getftp): Fix RESOURCE LEAK found by Coverity
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772):
11f80c
wget-1.19.5/src/ftp.c:1493: alloc_fn: Storage is returned from allocation function "fopen".
11f80c
wget-1.19.5/src/ftp.c:1493: var_assign: Assigning: "fp" = storage returned from "fopen(con->target, "wb")".
11f80c
wget-1.19.5/src/ftp.c:1811: leaked_storage: Variable "fp" going out of scope leaks the storage it points to.
11f80c
\# 1809|     if (fp && !output_stream)
11f80c
\# 1810|       fclose (fp);
11f80c
\# 1811|->   return err;
11f80c
\# 1812|   }
11f80c
\# 1813|
11f80c
11f80c
It can happen, that "if (!output_stream || con->cmd & DO_LIST)" on line #1398 can be true, even though "output_stream != NULL". In this case a new file is opened to "fp". Later it may happen in the FTPS branch, that some error will occure and code will jump to label "exit_error". In "exit_error", the "fp" is closed only if "output_stream == NULL". However this may not be true as described earlier and "fp" leaks.
11f80c
11f80c
On line #1588, there is the following conditional free of "fp":
11f80c
11f80c
  /* Close the local file.  */
11f80c
  if (!output_stream || con->cmd & DO_LIST)
11f80c
    fclose (fp);
11f80c
11f80c
Therefore the conditional at the end of the function after "exit_error" label should be modified to:
11f80c
11f80c
  if (fp && (!output_stream || con->cmd & DO_LIST))
11f80c
    fclose (fp);
11f80c
11f80c
This will ensure that "fp" does not leak in any case it sould be opened.
11f80c
11f80c
Signed-off-by: Tomas Hozza <thozza@redhat.com>
11f80c
---
11f80c
 src/ftp.c | 2 +-
11f80c
 1 file changed, 1 insertion(+), 1 deletion(-)
11f80c
11f80c
diff --git a/src/ftp.c b/src/ftp.c
11f80c
index 69148936..daaae939 100644
11f80c
--- a/src/ftp.c
11f80c
+++ b/src/ftp.c
11f80c
@@ -1806,7 +1806,7 @@ Error in server response, closing control connection.\n"));
11f80c
 exit_error:
11f80c
 
11f80c
   /* If fp is a regular file, close and try to remove it */
11f80c
-  if (fp && !output_stream)
11f80c
+  if (fp && (!output_stream || con->cmd & DO_LIST))
11f80c
     fclose (fp);
11f80c
   return err;
11f80c
 }
11f80c
-- 
11f80c
2.17.1
11f80c
11f80c
11f80c
From b8be904ac7c25387672b0aa39f7cba699bffc48e Mon Sep 17 00:00:00 2001
11f80c
From: Tomas Hozza <thozza@redhat.com>
11f80c
Date: Mon, 30 Jul 2018 15:38:45 +0200
11f80c
Subject: [PATCH 2/6] * src/http.c (check_auth): Fix RESOURCE LEAK found by
11f80c
 Coverity
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772):
11f80c
wget-1.19.5/src/http.c:2434: alloc_fn: Storage is returned from allocation function "xmalloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: alloc_fn: Storage is returned from allocation function "malloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: var_assign: Assigning: "p" = "malloc(n)".
11f80c
wget-1.19.5/lib/xmalloc.c:44:3: return_alloc: Returning allocated memory "p".
11f80c
wget-1.19.5/src/http.c:2434: var_assign: Assigning: "auth_stat" = storage returned from "xmalloc(4UL)".
11f80c
wget-1.19.5/src/http.c:2446: noescape: Resource "auth_stat" is not freed or pointed-to in "create_authorization_line".
11f80c
wget-1.19.5/src/http.c:5203:70: noescape: "create_authorization_line(char const *, char const *, char const *, char const *, char const *, _Bool *, uerr_t *)" does not free or save its parameter "auth_err".
11f80c
wget-1.19.5/src/http.c:2476: leaked_storage: Variable "auth_stat" going out of scope leaks the storage it points to.
11f80c
\# 2474|                 /* Creating the Authorization header went wrong */
11f80c
\# 2475|               }
11f80c
\# 2476|->         }
11f80c
\# 2477|         else
11f80c
\# 2478|           {
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772):
11f80c
wget-1.19.5/src/http.c:2431: alloc_fn: Storage is returned from allocation function "url_full_path".
11f80c
wget-1.19.5/src/url.c:1105:19: alloc_fn: Storage is returned from allocation function "xmalloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: alloc_fn: Storage is returned from allocation function "malloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: var_assign: Assigning: "p" = "malloc(n)".
11f80c
wget-1.19.5/lib/xmalloc.c:44:3: return_alloc: Returning allocated memory "p".
11f80c
wget-1.19.5/src/url.c:1105:19: var_assign: Assigning: "full_path" = "xmalloc(length + 1)".
11f80c
wget-1.19.5/src/url.c:1107:3: noescape: Resource "full_path" is not freed or pointed-to in function "full_path_write".
11f80c
wget-1.19.5/src/url.c:1078:47: noescape: "full_path_write(struct url const *, char *)" does not free or save its parameter "where".
11f80c
wget-1.19.5/src/url.c:1110:3: return_alloc: Returning allocated memory "full_path".
11f80c
wget-1.19.5/src/http.c:2431: var_assign: Assigning: "pth" = storage returned from "url_full_path(u)".
11f80c
wget-1.19.5/src/http.c:2446: noescape: Resource "pth" is not freed or pointed-to in "create_authorization_line".
11f80c
wget-1.19.5/src/http.c:5203:40: noescape: "create_authorization_line(char const *, char const *, char const *, char const *, char const *, _Bool *, uerr_t *)" does not free or save its parameter "path".
11f80c
wget-1.19.5/src/http.c:2476: leaked_storage: Variable "pth" going out of scope leaks the storage it points to.
11f80c
\# 2474|                 /* Creating the Authorization header went wrong */
11f80c
\# 2475|               }
11f80c
\# 2476|->         }
11f80c
\# 2477|         else
11f80c
\# 2478|           {
11f80c
11f80c
Both "pth" and "auth_stat" are allocated in "check_auth()" function. These are used for creating the HTTP Authorization Request header via "create_authorization_line()" function. In case the creation went OK (auth_err == RETROK), then the memory previously allocated to "pth" and "auth_stat" is freed. However if the creation failed, then the memory is never freed and it leaks.
11f80c
11f80c
Signed-off-by: Tomas Hozza <thozza@redhat.com>
11f80c
---
11f80c
 src/http.c | 4 ++--
11f80c
 1 file changed, 2 insertions(+), 2 deletions(-)
11f80c
11f80c
diff --git a/src/http.c b/src/http.c
11f80c
index 093be167..4e0d467a 100644
11f80c
--- a/src/http.c
11f80c
+++ b/src/http.c
11f80c
@@ -2451,6 +2451,8 @@ check_auth (const struct url *u, char *user, char *passwd, struct response *resp
11f80c
                                               auth_stat);
11f80c
 
11f80c
           auth_err = *auth_stat;
11f80c
+          xfree (auth_stat);
11f80c
+          xfree (pth);
11f80c
           if (auth_err == RETROK)
11f80c
             {
11f80c
               request_set_header (req, "Authorization", value, rel_value);
11f80c
@@ -2464,8 +2466,6 @@ check_auth (const struct url *u, char *user, char *passwd, struct response *resp
11f80c
                   register_basic_auth_host (u->host);
11f80c
                 }
11f80c
 
11f80c
-              xfree (pth);
11f80c
-              xfree (auth_stat);
11f80c
               *retry = true;
11f80c
               goto cleanup;
11f80c
             }
11f80c
-- 
11f80c
2.17.1
11f80c
11f80c
11f80c
From dfef92bac3997b9848e86d84a843d5d7dde4fd99 Mon Sep 17 00:00:00 2001
11f80c
From: Tomas Hozza <thozza@redhat.com>
11f80c
Date: Tue, 31 Jul 2018 16:58:12 +0200
11f80c
Subject: [PATCH 3/6] * src/http.c (http_loop): Fix RESOURCE LEAK found by
11f80c
 Coverity
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772):
11f80c
wget-1.19.5/src/http.c:4486: alloc_fn: Storage is returned from allocation function "url_string".
11f80c
wget-1.19.5/src/url.c:2248:3: alloc_fn: Storage is returned from allocation function "xmalloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: alloc_fn: Storage is returned from allocation function "malloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: var_assign: Assigning: "p" = "malloc(n)".
11f80c
wget-1.19.5/lib/xmalloc.c:44:3: return_alloc: Returning allocated memory "p".
11f80c
wget-1.19.5/src/url.c:2248:3: var_assign: Assigning: "result" = "xmalloc(size)".
11f80c
wget-1.19.5/src/url.c:2248:3: var_assign: Assigning: "p" = "result".
11f80c
wget-1.19.5/src/url.c:2250:3: noescape: Resource "p" is not freed or pointed-to in function "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
11f80c
wget-1.19.5/src/url.c:2253:7: noescape: Resource "p" is not freed or pointed-to in function "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
11f80c
wget-1.19.5/src/url.c:2257:11: noescape: Resource "p" is not freed or pointed-to in function "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
11f80c
wget-1.19.5/src/url.c:2264:3: noescape: Resource "p" is not freed or pointed-to in function "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.]
11f80c
wget-1.19.5/src/url.c:2270:7: identity_transfer: Passing "p" as argument 1 to function "number_to_string", which returns an offset off that argument.
11f80c
wget-1.19.5/src/utils.c:1776:11: var_assign_parm: Assigning: "p" = "buffer".
11f80c
wget-1.19.5/src/utils.c:1847:3: return_var: Returning "p", which is a copy of a parameter.
11f80c
wget-1.19.5/src/url.c:2270:7: noescape: Resource "p" is not freed or pointed-to in function "number_to_string".
11f80c
wget-1.19.5/src/utils.c:1774:25: noescape: "number_to_string(char *, wgint)" does not free or save its parameter "buffer".
11f80c
wget-1.19.5/src/url.c:2270:7: var_assign: Assigning: "p" = "number_to_string(p, url->port)".
11f80c
wget-1.19.5/src/url.c:2273:3: noescape: Resource "p" is not freed or pointed-to in function "full_path_write".
11f80c
wget-1.19.5/src/url.c:1078:47: noescape: "full_path_write(struct url const *, char *)" does not free or save its parameter "where".
11f80c
wget-1.19.5/src/url.c:2287:3: return_alloc: Returning allocated memory "result".
11f80c
wget-1.19.5/src/http.c:4486: var_assign: Assigning: "hurl" = storage returned from "url_string(u, URL_AUTH_HIDE_PASSWD)".
11f80c
wget-1.19.5/src/http.c:4487: noescape: Resource "hurl" is not freed or pointed-to in "logprintf".
11f80c
wget-1.19.5/src/http.c:4513: leaked_storage: Variable "hurl" going out of scope leaks the storage it points to.
11f80c
\# 4511|               {
11f80c
\# 4512|                 printwhat (count, opt.ntry);
11f80c
\# 4513|->               continue;
11f80c
\# 4514|               }
11f80c
\# 4515|             else
11f80c
11f80c
There are two conditional branches, which call continue, without freeing memory potentially allocated and pointed to by"hurl" pointer. In fase "!opt.verbose" is True and some of the appropriate conditions in the following if/else if construction, in which "continue" is called, are also true, then the memory allocated to "hurl" will leak.
11f80c
11f80c
Signed-off-by: Tomas Hozza <thozza@redhat.com>
11f80c
---
11f80c
 src/http.c | 2 ++
11f80c
 1 file changed, 2 insertions(+)
11f80c
11f80c
diff --git a/src/http.c b/src/http.c
11f80c
index 4e0d467a..46fde6f2 100644
11f80c
--- a/src/http.c
11f80c
+++ b/src/http.c
11f80c
@@ -4492,6 +4492,7 @@ http_loop (const struct url *u, struct url *original_url, char **newloc,
11f80c
               && (hstat.statcode == 500 || hstat.statcode == 501))
11f80c
             {
11f80c
               got_head = true;
11f80c
+              xfree (hurl);
11f80c
               continue;
11f80c
             }
11f80c
           /* Maybe we should always keep track of broken links, not just in
11f80c
@@ -4510,6 +4511,7 @@ Remote file does not exist -- broken link!!!\n"));
11f80c
           else if (check_retry_on_http_error (hstat.statcode))
11f80c
             {
11f80c
               printwhat (count, opt.ntry);
11f80c
+              xfree (hurl);
11f80c
               continue;
11f80c
             }
11f80c
           else
11f80c
-- 
11f80c
2.17.1
11f80c
11f80c
11f80c
From c045cdded4e3850724d8bb3a655852948e62c0df Mon Sep 17 00:00:00 2001
11f80c
From: Tomas Hozza <thozza@redhat.com>
11f80c
Date: Thu, 2 Aug 2018 13:49:52 +0200
11f80c
Subject: [PATCH 4/6] * src/utils.c (open_stat): Fix RESOURCE LEAK found by
11f80c
 Coverity
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772):
11f80c
wget-1.19.5/src/utils.c:914: open_fn: Returning handle opened by "open". [Note: The source code implementation of the function has been overridden by a user model.]
11f80c
wget-1.19.5/src/utils.c:914: var_assign: Assigning: "fd" = handle returned from "open(fname, flags, mode)".
11f80c
wget-1.19.5/src/utils.c:921: noescape: Resource "fd" is not freed or pointed-to in "fstat". [Note: The source code implementation of the function has been overridden by a builtin model.]
11f80c
wget-1.19.5/src/utils.c:924: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
11f80c
\#  922|     {
11f80c
\#  923|       logprintf (LOG_NOTQUIET, _("Failed to stat file %s, error: %s\n"), fname, strerror(errno));
11f80c
\#  924|->     return -1;
11f80c
\#  925|     }
11f80c
\#  926|   #if !(defined(WINDOWS) || defined(__VMS))
11f80c
11f80c
This seems to be a real issue, since the opened file descriptor in "fd"
11f80c
would leak. There is also additional check below the "fstat" call, which
11f80c
closes the opened "fd".
11f80c
11f80c
Signed-off-by: Tomas Hozza <thozza@redhat.com>
11f80c
---
11f80c
 src/utils.c | 1 +
11f80c
 1 file changed, 1 insertion(+)
11f80c
11f80c
diff --git a/src/utils.c b/src/utils.c
11f80c
index 0cb905ad..c6258083 100644
11f80c
--- a/src/utils.c
11f80c
+++ b/src/utils.c
11f80c
@@ -921,6 +921,7 @@ open_stat(const char *fname, int flags, mode_t mode, file_stats_t *fstats)
11f80c
   if (fstat (fd, &fdstats) == -1)
11f80c
   {
11f80c
     logprintf (LOG_NOTQUIET, _("Failed to stat file %s, error: %s\n"), fname, strerror(errno));
11f80c
+    close (fd);
11f80c
     return -1;
11f80c
   }
11f80c
 #if !(defined(WINDOWS) || defined(__VMS))
11f80c
-- 
11f80c
2.17.1
11f80c
11f80c
11f80c
From 8b451f9f21cc1b00d1a08116b542fb7bd7589405 Mon Sep 17 00:00:00 2001
11f80c
From: Tomas Hozza <thozza@redhat.com>
11f80c
Date: Fri, 3 Aug 2018 16:19:20 +0200
11f80c
Subject: [PATCH 5/6] * src/warc.c (warc_write_start_record): Fix potential
11f80c
 RESOURCE LEAK
11f80c
11f80c
In warc_write_start_record() function, the reutrn value of dup() is
11f80c
directly used in gzdopen() call and not stored anywhere. However the
11f80c
zlib documentation says that "The duplicated descriptor should be saved
11f80c
to avoid a leak, since gzdopen does not close fd if it fails." [1].
11f80c
This change stores the FD in a variable and closes it in case gzopen()
11f80c
fails.
11f80c
11f80c
[1] https://www.zlib.net/manual.html
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772):
11f80c
wget-1.19.5/src/warc.c:217: open_fn: Returning handle opened by "dup".
11f80c
wget-1.19.5/src/warc.c:217: leaked_handle: Failing to save or close handle opened by "dup(fileno(warc_current_file))" leaks it.
11f80c
\#  215|
11f80c
\#  216|         /* Start a new GZIP stream. */
11f80c
\#  217|->       warc_current_gzfile = gzdopen (dup (fileno (warc_current_file)), "wb9");
11f80c
\#  218|         warc_current_gzfile_uncompressed_size = 0;
11f80c
\#  219|
11f80c
11f80c
Signed-off-by: Tomas Hozza <thozza@redhat.com>
11f80c
---
11f80c
 src/warc.c | 13 ++++++++++++-
11f80c
 1 file changed, 12 insertions(+), 1 deletion(-)
11f80c
11f80c
diff --git a/src/warc.c b/src/warc.c
11f80c
index 3482cf3b..5ebd04d7 100644
11f80c
--- a/src/warc.c
11f80c
+++ b/src/warc.c
11f80c
@@ -203,6 +203,7 @@ warc_write_start_record (void)
11f80c
   /* Start a GZIP stream, if required. */
11f80c
   if (opt.warc_compression_enabled)
11f80c
     {
11f80c
+      int dup_fd;
11f80c
       /* Record the starting offset of the new record. */
11f80c
       warc_current_gzfile_offset = ftello (warc_current_file);
11f80c
 
11f80c
@@ -214,13 +215,23 @@ warc_write_start_record (void)
11f80c
       fflush (warc_current_file);
11f80c
 
11f80c
       /* Start a new GZIP stream. */
11f80c
-      warc_current_gzfile = gzdopen (dup (fileno (warc_current_file)), "wb9");
11f80c
+      dup_fd = dup (fileno (warc_current_file));
11f80c
+      if (dup_fd < 0)
11f80c
+        {
11f80c
+          logprintf (LOG_NOTQUIET,
11f80c
+_("Error duplicating WARC file file descriptor.\n"));
11f80c
+          warc_write_ok = false;
11f80c
+          return false;
11f80c
+        }
11f80c
+
11f80c
+      warc_current_gzfile = gzdopen (dup_fd, "wb9");
11f80c
       warc_current_gzfile_uncompressed_size = 0;
11f80c
 
11f80c
       if (warc_current_gzfile == NULL)
11f80c
         {
11f80c
           logprintf (LOG_NOTQUIET,
11f80c
 _("Error opening GZIP stream to WARC file.\n"));
11f80c
+          close (dup_fd);
11f80c
           warc_write_ok = false;
11f80c
           return false;
11f80c
         }
11f80c
-- 
11f80c
2.17.1
11f80c
11f80c
11f80c
From 2f451dbf4e83c751f6bbba7ed26d90bf275fcbf7 Mon Sep 17 00:00:00 2001
11f80c
From: Tomas Hozza <thozza@redhat.com>
11f80c
Date: Fri, 24 Aug 2018 16:57:37 +0200
11f80c
Subject: [PATCH 6/6] * src/warc.c (warc_write_cdx_record): Fix RESOURCE LEAK
11f80c
 found by Coverity
11f80c
11f80c
Error: RESOURCE_LEAK (CWE-772): - REAL ERROR
11f80c
wget-1.19.5/src/warc.c:1376: alloc_fn: Storage is returned from allocation function "url_escape".
11f80c
wget-1.19.5/src/url.c:284:3: alloc_fn: Storage is returned from allocation function "url_escape_1".
11f80c
wget-1.19.5/src/url.c:255:3: alloc_fn: Storage is returned from allocation function "xmalloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: alloc_fn: Storage is returned from allocation function "malloc".
11f80c
wget-1.19.5/lib/xmalloc.c:41:11: var_assign: Assigning: "p" = "malloc(n)".
11f80c
wget-1.19.5/lib/xmalloc.c:44:3: return_alloc: Returning allocated memory "p".
11f80c
wget-1.19.5/src/url.c:255:3: var_assign: Assigning: "newstr" = "xmalloc(newlen + 1)".
11f80c
wget-1.19.5/src/url.c:258:3: var_assign: Assigning: "p2" = "newstr".
11f80c
wget-1.19.5/src/url.c:275:3: return_alloc: Returning allocated memory "newstr".
11f80c
wget-1.19.5/src/url.c:284:3: return_alloc_fn: Directly returning storage allocated by "url_escape_1".
11f80c
wget-1.19.5/src/warc.c:1376: var_assign: Assigning: "redirect_location" = storage returned from "url_escape(redirect_location)".
11f80c
wget-1.19.5/src/warc.c:1381: noescape: Resource "redirect_location" is not freed or pointed-to in "fprintf".
11f80c
wget-1.19.5/src/warc.c:1387: leaked_storage: Returning without freeing "redirect_location" leaks the storage that it points to.
11f80c
\# 1385|     fflush (warc_current_cdx_file);
11f80c
\# 1386|
11f80c
\# 1387|->   return true;
11f80c
\# 1388|   }
11f80c
\# 1389|
11f80c
11f80c
url_escape() really returns a newly allocated memory and it leaks when the warc_write_cdx_record() returns. The memory returned from url_escape() is usually stored in a temporary variable in other parts of the project and then freed. I took the same approach.
11f80c
11f80c
Signed-off-by: Tomas Hozza <thozza@redhat.com>
11f80c
---
11f80c
 src/warc.c | 8 +++++---
11f80c
 1 file changed, 5 insertions(+), 3 deletions(-)
11f80c
11f80c
diff --git a/src/warc.c b/src/warc.c
11f80c
index 5ebd04d7..2eb74966 100644
11f80c
--- a/src/warc.c
11f80c
+++ b/src/warc.c
11f80c
@@ -1364,6 +1364,7 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
11f80c
   char timestamp_str_cdx[15];
11f80c
   char offset_string[MAX_INT_TO_STRING_LEN(off_t)];
11f80c
   const char *checksum;
11f80c
+  char *tmp_location = NULL;
11f80c
 
11f80c
   memcpy (timestamp_str_cdx     , timestamp_str     , 4); /* "YYYY" "-" */
11f80c
   memcpy (timestamp_str_cdx +  4, timestamp_str +  5, 2); /* "mm"   "-" */
11f80c
@@ -1382,18 +1383,19 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
11f80c
   if (mime_type == NULL || strlen(mime_type) == 0)
11f80c
     mime_type = "-";
11f80c
   if (redirect_location == NULL || strlen(redirect_location) == 0)
11f80c
-    redirect_location = "-";
11f80c
+    tmp_location = strdup ("-");
11f80c
   else
11f80c
-    redirect_location = url_escape(redirect_location);
11f80c
+    tmp_location = url_escape(redirect_location);
11f80c
 
11f80c
   number_to_string (offset_string, offset);
11f80c
 
11f80c
   /* Print the CDX line. */
11f80c
   fprintf (warc_current_cdx_file, "%s %s %s %s %d %s %s - %s %s %s\n", url,
11f80c
            timestamp_str_cdx, url, mime_type, response_code, checksum,
11f80c
-           redirect_location, offset_string, warc_current_filename,
11f80c
+           tmp_location, offset_string, warc_current_filename,
11f80c
            response_uuid);
11f80c
   fflush (warc_current_cdx_file);
11f80c
+  free (tmp_location);
11f80c
 
11f80c
   return true;
11f80c
 }
11f80c
-- 
11f80c
2.17.1
11f80c