Print this page
10125 smatch fixes for cmd-inet

*** 21,31 **** /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #pragma ident "%Z%%M% %I% %E% SMI" #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <errno.h> --- 21,33 ---- /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! /* ! * Copyright (c) 2018, Joyent, Inc. ! */ #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <errno.h>
*** 2749,2760 **** if ((p_section == NULL) || (plist == NULL)) return (B_FALSE); pae = plist->ael_head; while (pae != NULL) { free(pae); ! pae = pae->ae_next; } plist->ael_head = plist->ael_tail = NULL; plist->ael_argc = 0; } else if (gp_config_file != NULL) { for (i = 0; i < argc; i++) { --- 2751,2763 ---- if ((p_section == NULL) || (plist == NULL)) return (B_FALSE); pae = plist->ael_head; while (pae != NULL) { + ae_t *next = pae->ae_next; free(pae); ! pae = next; } plist->ael_head = plist->ael_tail = NULL; plist->ael_argc = 0; } else if (gp_config_file != NULL) { for (i = 0; i < argc; i++) {