diff options
| author | hshoexer <> | 2005-01-26 14:34:44 +0000 |
|---|---|---|
| committer | hshoexer <> | 2005-01-26 14:34:44 +0000 |
| commit | 3cbef931ad6575685450ab8fb4a6786014a7cbe5 (patch) | |
| tree | 780b12ca4184a3b875d740b86e17aad004061626 /src/lib/libc | |
| parent | 979de9d040d77e93d86b054d2008d12d51037866 (diff) | |
| download | openbsd-3cbef931ad6575685450ab8fb4a6786014a7cbe5.tar.gz openbsd-3cbef931ad6575685450ab8fb4a6786014a7cbe5.tar.bz2 openbsd-3cbef931ad6575685450ab8fb4a6786014a7cbe5.zip | |
on error set correct pointer to NULL.
From phk@freebsd.org
ok markus@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/engine/hw_cryptodev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c index d12d23d9fc..75a56058ca 100644 --- a/src/lib/libcrypto/engine/hw_cryptodev.c +++ b/src/lib/libcrypto/engine/hw_cryptodev.c | |||
| @@ -239,7 +239,7 @@ get_cryptodev_ciphers(const int **cnids) | |||
| 239 | int fd, i, count = 0; | 239 | int fd, i, count = 0; |
| 240 | 240 | ||
| 241 | if ((fd = get_dev_crypto()) < 0) { | 241 | if ((fd = get_dev_crypto()) < 0) { |
| 242 | *nids = NULL; | 242 | *cnids = NULL; |
| 243 | return (0); | 243 | return (0); |
| 244 | } | 244 | } |
| 245 | memset(&sess, 0, sizeof(sess)); | 245 | memset(&sess, 0, sizeof(sess)); |
| @@ -305,7 +305,7 @@ get_cryptodev_digests(const int **cnids) | |||
| 305 | int fd, i, count = 0; | 305 | int fd, i, count = 0; |
| 306 | 306 | ||
| 307 | if ((fd = get_dev_crypto()) < 0) { | 307 | if ((fd = get_dev_crypto()) < 0) { |
| 308 | *nids = NULL; | 308 | *cnids = NULL; |
| 309 | return (0); | 309 | return (0); |
| 310 | } | 310 | } |
| 311 | memset(&sess, 0, sizeof(sess)); | 311 | memset(&sess, 0, sizeof(sess)); |
