summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadoslaw Czerski <r.czerski@samsung.com>2016-04-01 17:13:10 +0200
committerLukasz Stanislawski <l.stanislaws@samsung.com>2016-04-04 03:02:43 -0700
commit85bca1791638e646c74b1ba48980bc774b84ab89 (patch)
tree361109b568972500e2cd5981a1ff7fb438b900f6
parent584e67f6f9e6cfb9500543dfa9bbff870623db3e (diff)
downloadindicator-win-85bca1791638e646c74b1ba48980bc774b84ab89.tar.gz
indicator-win-85bca1791638e646c74b1ba48980bc774b84ab89.tar.bz2
indicator-win-85bca1791638e646c74b1ba48980bc774b84ab89.zip
ticker: Memory leak fix.
Change-Id: I2e81209ba280b0861213f4821627aafad37df4af Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
-rw-r--r--src/ticker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ticker.c b/src/ticker.c
index ef07c55..7d0bc83 100644
--- a/src/ticker.c
+++ b/src/ticker.c
@@ -1014,9 +1014,6 @@ static void _ticker_noti_detailed_changed_cb(void *data, notification_type_e typ
_D("_ticker_noti_changed_cb");
- ticker_info = calloc(1, sizeof(ticker_info_s));
- ret_if(!ticker_info);
-
if (num_op == 1) {
//TODO: Functions below are depracated, should not be used
ret = notification_op_get_data(op_list, NOTIFICATION_OP_DATA_TYPE, &op_type);
@@ -1074,6 +1071,9 @@ static void _ticker_noti_detailed_changed_cb(void *data, notification_type_e typ
return;
}
+ ticker_info = calloc(1, sizeof(ticker_info_s));
+ ret_if(ticker_info == NULL);
+
/* Skip if previous ticker is still shown */
/*
if (ticker_info->win != NULL) {
@@ -1105,6 +1105,7 @@ static void _ticker_noti_detailed_changed_cb(void *data, notification_type_e typ
return;
}
}
+ free(ticker_info);
}
static Eina_Bool _tickernoti_callback_register_idler_cb(void *data)