diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2009-10-25 20:43:30 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2009-10-25 20:43:30 +0000 |
commit | a0dd365cd3f0ea6cb1c4554459f54bde313073f9 (patch) | |
tree | aeee306231fa187b7074106fe8ed2c43ac50f834 | |
parent | 0e17253b5cb3f6794861a9c26991ad64ba323a21 (diff) |
Fix potential null dereference.
Found by LLVM/Clang Static Analyzer.
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/client.c b/usr.sbin/smtpd/client.c index 0ee14c2b506..1158a7a31dd 100644 --- a/usr.sbin/smtpd/client.c +++ b/usr.sbin/smtpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.8 2009/10/19 19:53:05 gilles Exp $ */ +/* $OpenBSD: client.c,v 1.9 2009/10/25 20:43:29 chl Exp $ */ /* * Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net> @@ -91,7 +91,7 @@ client_init(int fd, char *ehlo) rv = 0; done: - if (rv) { + if (rv && sp != NULL) { free(sp->ehlo); free(sp->sender); if (sp->data) |