Commit 5bde0423 authored by npzacs's avatar npzacs
Browse files

Erase sensitive data in close

parent 9ad1cd75
......@@ -946,12 +946,20 @@ void aacs_close(AACS *aacs)
if (!aacs)
return;
/* erase sensitive data */
if (aacs->uks) {
memset(aacs->uks, 0, 16 * aacs->num_uks);
}
X_FREE(aacs->uks);
X_FREE(aacs->cps_units);
X_FREE(aacs->path);
DEBUG(DBG_AACS, "AACS destroyed!\n");
/* erase sensitive data */
memset(aacs, 0, sizeof(*aacs));
X_FREE(aacs);
}
......
......@@ -1006,6 +1006,9 @@ void mmc_close(MMC *mmc)
DEBUG(DBG_MMC, "Closed MMC drive\n");
/* erase sensitive data */
memset(mmc, 0, sizeof(*mmc));
X_FREE(mmc);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment