aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect-tool.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--agent/protect-tool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index 1d706ea2b..d501abd79 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -275,6 +275,8 @@ read_key (const char *fname)
unsigned char *key;
buf = read_file (fname, &buflen);
+ if (!buf)
+ return NULL;
key = make_canonical (fname, buf, buflen);
xfree (buf);
return key;