Keep last AR ID
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 21 Apr 2013 06:19:30 +0000 (08:19 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 21 Apr 2013 06:19:30 +0000 (08:19 +0200)
src/libpts/plugins/imv_attestation/attest_db.c

index 81445ac..9d49a27 100644 (file)
@@ -847,6 +847,7 @@ METHOD(attest_db_t, list_devices, void,
                                        if (e_ar)
                                        {
                                                e_ar->enumerate(e_ar, &ar_id_type, &ar_id_value);
+                                               ar_id_value = chunk_clone(ar_id_value);
                                                e_ar->destroy(e_ar);
                                        }
                                }
@@ -854,6 +855,7 @@ METHOD(attest_db_t, list_devices, void,
                                {
                                        printf(" %.*s", (int)ar_id_value.len, ar_id_value.ptr);
                                }
+                               last_ar_id = ar_id;
                        }
                        printf("\n");
                }