diff options
author | 2003-08-27 23:05:14 +0000 | |
---|---|---|
committer | 2003-08-27 23:05:14 +0000 | |
commit | a56fdf914c61c491a40b2e5e6942946cbf29782e (patch) | |
tree | 17ee1e6ffca4107379c7ca504a51d189464edc80 | |
parent | fix memory leaks. pr3416 from Patrick Latifi <patrick.l@hermes.usherb.ca> (diff) | |
download | wireguard-openbsd-a56fdf914c61c491a40b2e5e6942946cbf29782e.tar.xz wireguard-openbsd-a56fdf914c61c491a40b2e5e6942946cbf29782e.zip |
oops
-rw-r--r-- | usr.bin/sup/src/scmio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/sup/src/scmio.c b/usr.bin/sup/src/scmio.c index 23f4e9f2170..c63a4043ef0 100644 --- a/usr.bin/sup/src/scmio.c +++ b/usr.bin/sup/src/scmio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scmio.c,v 1.13 2003/08/27 23:02:19 tedu Exp $ */ +/* $OpenBSD: scmio.c,v 1.14 2003/08/27 23:05:14 tedu Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -673,11 +673,12 @@ int readstring(buf) /* read string data block */ return (scmerr(-1, "Can't malloc %d bytes for string", count)); if (cryptflag) { x = getcryptbuf(count+1); + if (x == SCMOK) + x = readdata(count, cryptbuf); if (x != SCMOK) { free(p); return (x); } - x = readdata(count, cryptbuf); if (scmdebug > 3) printf("SCM Reading encrypted string %s\n", cryptbuf); decode(cryptbuf, p, count); |