projects
/
profile
/
ivi
/
lemolo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f930621
)
fix leaks reported by valgrind.
author
Gustavo Sverzut Barbieri
<barbieri@profusion.mobi>
Sun, 15 Jul 2012 07:42:35 +0000
(
04:42
-0300)
committer
Gustavo Sverzut Barbieri
<barbieri@profusion.mobi>
Sun, 15 Jul 2012 07:42:35 +0000
(
04:42
-0300)
forgot to free the callback context after it was dispatched to user.
dialer/ofono.c
patch
|
blob
|
history
diff --git
a/dialer/ofono.c
b/dialer/ofono.c
index
99c4175
..
8af019f
100644
(file)
--- a/
dialer/ofono.c
+++ b/
dialer/ofono.c
@@
-183,8
+183,10
@@
static void _ofono_simple_reply(void *data, DBusMessage *msg __UNUSED__,
e = _ofono_error_parse(err->name);
}
- if (ctx)
+ if (ctx)
{
ctx->cb((void *)ctx->data, e);
+ free(ctx);
+ }
}
typedef struct _OFono_String_Cb_Context
@@
-216,6
+218,7
@@
static void _ofono_string_reply(void *data, DBusMessage *msg, DBusError *err)
DBG("%s %s", ctx->name, str);
free(str);
+ free(ctx);
}
struct _OFono_Pending
@@
-1748,6
+1751,8
@@
static void _ofono_dial_reply(void *data, DBusMessage *msg, DBusError *err)
if (ctx->cb)
ctx->cb((void *)ctx->data, oe, c);
+
+ free(ctx);
}
OFono_Pending *ofono_dial(const char *number, const char *hide_callerid,