mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-22 17:16:24 +03:00
Utilise magic memory tree interface for src/ser_posix.c
This commit is contained in:
@@ -288,10 +288,7 @@ static int net_open(const char *port, union filedescriptor *fdp) {
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *result, *rp;
|
||||
|
||||
if ((hstr = hp = strdup(port)) == NULL) {
|
||||
pmsg_error("out of memory\n");
|
||||
return -1;
|
||||
}
|
||||
hstr = hp = mmt_strdup(port);
|
||||
|
||||
/*
|
||||
* As numeric IPv6 addresses use colons as separators, we need to
|
||||
@@ -348,7 +345,7 @@ static int net_open(const char *port, union filedescriptor *fdp) {
|
||||
freeaddrinfo(result);
|
||||
|
||||
error:
|
||||
free(hp);
|
||||
mmt_free(hp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user