[goffice] go-file: plug leak.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] go-file: plug leak.
- Date: Fri, 30 Sep 2011 19:17:06 +0000 (UTC)
commit a8d23c73b1407ddd67aa440cdf8e90264df3903b
Author: Morten Welinder <terra gnome org>
Date: Fri Sep 30 11:32:13 2011 -0400
go-file: plug leak.
ChangeLog | 4 ++++
goffice/utils/go-file.c | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 59f84ad..51f7630 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-30 Morten Welinder <terra gnome org>
+
+ * goffice/utils/go-file.c (go_dirname_from_uri): Plug leak.
+
2011-09-26 Jean Brefort <jean brefort normalesup org>
* plugins/plot_barcol/gog-barcol.c (gog_barcol_plot_set_property),
diff --git a/goffice/utils/go-file.c b/goffice/utils/go-file.c
index 487fea0..0758d37 100644
--- a/goffice/utils/go-file.c
+++ b/goffice/utils/go-file.c
@@ -502,9 +502,14 @@ go_dirname_from_uri (char const *uri, gboolean brief)
char *dirname_utf8, *dirname;
char *uri_dirname = g_path_get_dirname (uri);
dirname = uri_dirname ? go_filename_from_uri (uri_dirname) : NULL;
- dirname = dirname ? g_strconcat ("file://", dirname, NULL) : NULL;
g_free (uri_dirname);
+ if (dirname) {
+ char *temp = g_strconcat ("file://", dirname, NULL);
+ g_free (dirname);
+ dirname = temp;
+ }
+
if (brief && dirname &&
g_ascii_strncasecmp (dirname, "file:///", 8) == 0) {
char *temp = g_strdup (dirname + 7);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]