diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-23 13:24:37 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-05-24 00:46:20 +0400 |
commit | 26b78f4d3c3f45f84067440e56c3ebf2d25a9574 (patch) | |
tree | 18b701bec9b4e8849079f9dac7dc9881e935d098 /libcacard/vcard_emul_nss.c | |
parent | f33a984d512dbcb6762b002a65de4ea748e31d4a (diff) | |
download | qemu-26b78f4d3c3f45f84067440e56c3ebf2d25a9574.zip |
libcacard: Convert two leftover realloc() to GLib
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 | 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]; |