* [PATCH] Fix a memory leak reported by cppcheck.
@ 2011-03-18 13:18 Bertrand Aygon
2011-03-18 16:29 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Bertrand Aygon @ 2011-03-18 13:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]
---
src/smsutil.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/smsutil.c b/src/smsutil.c
index 5524932..e781399 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -3344,7 +3344,7 @@ void sms_tx_backup_free(const char *imsi, unsigned long id,
len = scandir(path, &entries, NULL, versionsort);
if (len < 0)
- return;
+ goto nodir_exit;
/* skip '..' and '.' entries */
while (len-- > 2) {
@@ -3362,6 +3362,8 @@ void sms_tx_backup_free(const char *imsi, unsigned long id,
g_free(entries);
rmdir(path);
+
+nodir_exit:
g_free(path);
}
--
1.7.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-18 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 13:18 [PATCH] Fix a memory leak reported by cppcheck Bertrand Aygon
2011-03-18 16:29 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.