diff options
author | 2018-06-14 19:51:11 +0000 | |
---|---|---|
committer | 2018-06-14 19:51:11 +0000 | |
commit | e554841d642d1a9918f7773c47f4d54b22ce0d43 (patch) | |
tree | 5902029c6d784629a76f7d913f73118db2eac809 | |
parent | Use a blinding value when generating an ECDSA signature, in order to (diff) | |
download | wireguard-openbsd-e554841d642d1a9918f7773c47f4d54b22ce0d43.tar.xz wireguard-openbsd-e554841d642d1a9918f7773c47f4d54b22ce0d43.zip |
Return from magic_test does not need to be copied because the caller
will do so anyway and it was just being leaked. ok brynet deraadt
-rw-r--r-- | usr.bin/file/magic-test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/file/magic-test.c b/usr.bin/file/magic-test.c index 88baab00269..037d3d19581 100644 --- a/usr.bin/file/magic-test.c +++ b/usr.bin/file/magic-test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic-test.c,v 1.25 2017/04/18 14:16:48 nicm Exp $ */ +/* $OpenBSD: magic-test.c,v 1.26 2018/06/14 19:51:11 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -1404,10 +1404,10 @@ magic_test(struct magic *m, const void *base, size_t size, int flags) if (*ms.out != '\0') { if (flags & MAGIC_TEST_MIME) { if (ms.mimetype != NULL) - return (xstrdup(ms.mimetype)); + return (ms.mimetype); return (NULL); } - return (xstrdup(ms.out)); + return (ms.out); } return (NULL); } |