Thanks, Eramoto, Will update the patch. -- Sathish Thanks & Regards, Sathish N On Thu, Jul 6, 2017 at 10:45 AM, ERAMOTO Masaya <eramoto.masaya@xxxxxxxxxxxxxx> wrote: > Hi Sathish, > >> @@ -518,7 +545,26 @@ int messages_get_message(void *session, const char *handle, >> messages_get_message_cb callback, >> void *user_data) >> { >> - return -ENOSYS; >> + struct session *s = session; >> + struct message_view_data *mvd; >> + >> + mvd = g_new0(struct message_view_data, 1); >> + mvd->session = s; >> + mvd->handle = handle; >> + mvd->callback = callback; >> + mvd->user_data = user_data; >> + >> + mvd->path = g_build_filename(s->cwd_absolute, handle, NULL); >> + mvd->fp = fopen(mvd->path, "r"); >> + if (mvd->fp == NULL) { >> + int err = -errno; >> + DBG("fopen(): %d, %s", -err, strerror(-err)); >> + g_free(mvd->path); >> + return -ENOENT; > > I think the memory of mvd leaks when fopen fails. > > Regards, > Eramoto -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html