aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/ethumb_client
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2013-02-11 10:54:34 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2013-02-11 10:54:34 +0000
commitfe86e29fa67ad0ebce468509775bc9bf1112fdb1 (patch)
tree9666288896d35e62bd95cedcccb08b0e59690eb5 /src/bin/ethumb_client
parentefl/ethumb: Fix memory leak on error path in ethumb_slave. (diff)
downloadefl-fe86e29fa67ad0ebce468509775bc9bf1112fdb1.tar.gz
efl/ethumb: Fix more memory leaks in ethumbd_slave.c
MAke sure we free strdup'ed memory when hittign an error case. SVN revision: 83818
Diffstat (limited to 'src/bin/ethumb_client')
-rw-r--r--src/bin/ethumb_client/ethumbd_slave.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/bin/ethumb_client/ethumbd_slave.c b/src/bin/ethumb_client/ethumbd_slave.c
index 4a328b8d50..294421d31b 100644
--- a/src/bin/ethumb_client/ethumbd_slave.c
+++ b/src/bin/ethumb_client/ethumbd_slave.c
@@ -448,16 +448,30 @@ _ec_frame_set(struct _Ethumbd_Child *ec, Ethumb *e)
return 0;
r = _ec_read_safe(STDIN_FILENO, &type, sizeof(type));
if (!r)
- return 0;
+ {
+ free(theme_file);
+ return 0;
+ }
r = _ec_pipe_str_read(ec, &group);
if (!r)
- return 0;
+ {
+ free(theme_file);
+ return 0;
+ }
r = _ec_read_safe(STDIN_FILENO, &type, sizeof(type));
if (!r)
- return 0;
+ {
+ free(theme_file);
+ free(group);
+ return 0;
+ }
r = _ec_pipe_str_read(ec, &swallow);
if (!r)
- return 0;
+ {
+ free(theme_file);
+ free(group);
+ return 0;
+ }
DBG("frame = %s:%s:%s", theme_file, group, swallow);
ethumb_frame_set(e, theme_file, group, swallow);
free(theme_file);