CID 83 added assertion to demonstrate config_nic_rules() does not
call strchr(NULL, '/').
bk: 4ab47854LqWSJmOo1eZeyYFCOhZExQ
* [Bug 1312] ntpq/ntpdc MD5 passwords truncated to 8 chars on Suns.
+* CID 10 missing free(up); in refclock_palisade.c error return, again.
+* CID 83 added assertion to demonstrate config_nic_rules() does not
+ call strchr(NULL, '/').
(4.2.5p215) 2009/09/18 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1292] Workaround last VC6 unsigned __int64 kink.
(4.2.5p214) 2009/09/17 Released by Harlan Stenn <stenn@ntp.org>
break;
case 0:
+ NTP_INSIST(if_name != NULL);
pchSlash = strchr(if_name, '/');
if (pchSlash != NULL)
*pchSlash = '\0';
#ifdef DEBUG
printf("Palisade(%d) tcgetattr(fd, &tio)\n",unit);
#endif
+ close(fd);
return (0);
}
*/
up = (struct palisade_unit *) emalloc(sizeof(struct palisade_unit));
- if (!(up)) {
- msyslog(LOG_ERR, "Palisade(%d) emalloc: %m",unit);
-#ifdef DEBUG
- printf("Palisade(%d) emalloc\n",unit);
-#endif
- (void) close(fd);
- return (0);
- }
-
memset((char *)up, 0, sizeof(struct palisade_unit));
up->type = CLK_TYPE(peer);
#ifdef DEBUG
printf("Palisade(%d) tcsetattr(fd, &tio)\n",unit);
#endif
+ close(fd);
+ free(up);
return 0;
}