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
@ -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…
x
Reference in New Issue
Block a user