]> err.no Git - yubikey-personalization/commitdiff
use ykds_free() to free YK_STATUS instead of straight free
authorKlas Lindfors <klas@yubico.com>
Mon, 15 Oct 2012 17:13:07 +0000 (19:13 +0200)
committerKlas Lindfors <klas@yubico.com>
Mon, 15 Oct 2012 17:19:00 +0000 (19:19 +0200)
ykchalresp.c

index 62fb4b01993cdc99db86d9765b0fb7e4b91839c3..0b0d3166010a79e578829056f330d1b14b115473 100644 (file)
@@ -157,7 +157,7 @@ static int check_firmware(YK_KEY *yk, bool verbose)
        YK_STATUS *st = ykds_alloc();
 
        if (!yk_get_status(yk, st)) {
-               free(st);
+               ykds_free(st);
                return 0;
        }
 
@@ -173,7 +173,7 @@ static int check_firmware(YK_KEY *yk, bool verbose)
            (ykds_version_major(st) == 2
             && ykds_version_minor(st) < 2)) {
                fprintf(stderr, "Challenge-response not supported before YubiKey 2.2.\n");
-               free(st);
+               ykds_free(st);
                return 0;
        }