diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-23 13:24:34 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-05-24 00:45:57 +0400 |
commit | 124fe7fb1b7a1db8cb2ebb9edae84716ffaf37ce (patch) | |
tree | 1e7c634cb81b4184c5accad9609bf596e93bc74b /libcacard/vcard_emul_nss.c | |
parent | d357e3d9d24c8a9e99c994c3c1ee5acb32484a3d (diff) |
libcacard: Plug memory leaks around vreader_get_reader_list()
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'libcacard/vcard_emul_nss.c')
-rw-r--r-- | libcacard/vcard_emul_nss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 75b9d79412..78265932fa 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -433,11 +433,13 @@ vcard_emul_find_vreader_from_slot(PK11SlotInfo *slot) VReader *reader = vreader_list_get_reader(current_entry); VReaderEmul *reader_emul = vreader_get_private(reader); if (reader_emul->slot == slot) { + vreader_list_delete(reader_list); return reader; } vreader_free(reader); } + vreader_list_delete(reader_list); return NULL; } @@ -1059,6 +1061,8 @@ vcard_emul_replay_insertion_events(void) next_entry = vreader_list_get_next(current_entry); vreader_queue_card_event(vreader); } + + vreader_list_delete(list); } /* |