Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> --- commands/digest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/commands/digest.c b/commands/digest.c index 876c37a..90e68a1 100644 --- a/commands/digest.c +++ b/commands/digest.c @@ -147,10 +147,12 @@ static int do_digest(int argc, char *argv[]) } } - ret = digest_set_key(d, key, keylen); - free(tmp_key); - if (ret) - goto err; + if (key) { + ret = digest_set_key(d, key, keylen); + free(tmp_key); + if (ret) + goto err; + } if (sigfile) { sig = tmp_sig = read_file(sigfile, &siglen); -- 2.1.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox