diff options
Diffstat (limited to 'libcacard/vcard_emul_nss.c')
-rw-r--r-- | libcacard/vcard_emul_nss.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 78265932fa..8e055517f8 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -1178,11 +1178,8 @@ vcard_emul_options(const char *args) if (opts->vreader_count >= reader_count) { reader_count += READER_STEP; - vreaderOpt = realloc(opts->vreader, - reader_count * sizeof(*vreaderOpt)); - if (vreaderOpt == NULL) { - return opts; /* we're done */ - } + vreaderOpt = g_renew(VirtualReaderOptions, opts->vreader, + reader_count); } opts->vreader = vreaderOpt; vreaderOpt = &vreaderOpt[opts->vreader_count]; |