summaryrefslogtreecommitdiff
path: root/src/eom-uri-converter.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-11-03 15:14:41 +0300
committerinfirit <[email protected]>2014-12-23 13:57:32 +0100
commitd239e3a08cf1e6a437976c3f5b3206a30ef33e67 (patch)
treeda51fa3d1adb253d466e1552284aebf8e4ac61fb /src/eom-uri-converter.c
parent2347bbac04098a28109ac86c7bbd132e7cf7a488 (diff)
downloadeom-d239e3a08cf1e6a437976c3f5b3206a30ef33e67.tar.bz2
eom-d239e3a08cf1e6a437976c3f5b3206a30ef33e67.tar.xz
allocate memory a bit later to avoid possible leaks
Diffstat (limited to 'src/eom-uri-converter.c')
-rw-r--r--src/eom-uri-converter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eom-uri-converter.c b/src/eom-uri-converter.c
index 6382e74..452a19b 100644
--- a/src/eom-uri-converter.c
+++ b/src/eom-uri-converter.c
@@ -834,8 +834,6 @@ eom_uri_converter_preview (const char *format_str, EomImage *img, GdkPixbufForma
n_digits = ceil (MIN (log10 (G_MAXULONG), MAX (log10 (counter), log10 (n_images))));
- str = g_string_new ("");
-
if (!g_utf8_validate (format_str, -1, NULL))
return NULL;
@@ -843,6 +841,8 @@ eom_uri_converter_preview (const char *format_str, EomImage *img, GdkPixbufForma
s = format_str;
token_next = FALSE;
+ str = g_string_new ("");
+
for (i = 0; i < len; i++, s = g_utf8_next_char (s)) {
c = g_utf8_get_char (s);