Unbreak the build by passing the string to strdup, not its length
MFC after: 1 week X-MFC with: r310931 Pointyhat to: ngie
This commit is contained in:
parent
bfb81e6524
commit
1e5211d238
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=310942
@ -1945,7 +1945,7 @@ snmp_parse_server(struct snmp_client *sc, const char *str)
|
||||
} else if (p > s) {
|
||||
/* host */
|
||||
free(sc->chost);
|
||||
if ((sc->chost = strdup(strlen(s))) == NULL) {
|
||||
if ((sc->chost = strdup(s)) == NULL) {
|
||||
seterr(sc, "%s", strerror(errno));
|
||||
return (-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user