diff options
-rw-r--r-- | common/machine_id.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/machine_id.c b/common/machine_id.c index a530fdeb1d..8c273b9349 100644 --- a/common/machine_id.c +++ b/common/machine_id.c @@ -37,6 +37,11 @@ static int machine_id_set_globalvar(void) return 0; digest = digest_alloc_by_algo(HASH_ALGO_SHA1); + if (!digest) { + ret = -EOPNOTSUPP; + goto out; + } + ret = digest_init(digest); if (ret) goto out; |