]> git.meshlink.io Git - utcp/commitdiff
Fix a segfault when debugging is enabled.
authorGuus Sliepen <guus@meshlink.io>
Sun, 11 Oct 2015 21:35:49 +0000 (23:35 +0200)
committerGuus Sliepen <guus@sliepen.org>
Sun, 2 Jul 2017 10:01:23 +0000 (12:01 +0200)
utcp.c

diff --git a/utcp.c b/utcp.c
index d846fb1965bd4384bef7239ae0781e08fb257d8f..e347bb7165209b284409c6f92fca724993c05c04 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -988,7 +988,7 @@ reset:
 }
 
 int utcp_shutdown(struct utcp_connection *c, int dir) {
-       debug("%p shutdown %d at %u\n", c ? c->utcp : NULL, dir, c->snd.last);
+       debug("%p shutdown %d at %u\n", c ? c->utcp : NULL, dir, c ? c->snd.last : 0);
        if(!c) {
                errno = EFAULT;
                return -1;