smsutil: fix a memory leak

This was reported by cppcheck.
This commit is contained in:
Bertrand Aygon 2011-03-18 14:18:02 +01:00 committed by Denis Kenzior
parent 9871da333a
commit 0403b341ca
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}