From fe86e29fa67ad0ebce468509775bc9bf1112fdb1 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 11 Feb 2013 10:54:34 +0000 Subject: [PATCH] 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 --- src/bin/ethumb_client/ethumbd_slave.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/bin/ethumb_client/ethumbd_slave.c b/src/bin/ethumb_client/ethumbd_slave.c index 4a328b8..294421d 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); -- 2.7.4