mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 04:08:01 +02:00
platform: use g_strdup() instead of strdup() in ethtool code
The string is freed with g_free(), it needs to be allocated with g_strdup(). In practice, the GLib allocator uses malloc() nowadays, but it is better to be consistent.
This commit is contained in:
parent
326fb8f9cf
commit
45ab9d96f1
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ ethtool_send_and_recv(struct nl_sock *sock,
|
|||
|
||||
out:
|
||||
if (nle < 0 && err_msg && *err_msg == NULL)
|
||||
*err_msg = strdup(nm_strerror(nle));
|
||||
*err_msg = g_strdup(nm_strerror(nle));
|
||||
|
||||
if (nle >= 0 && cb_result < 0)
|
||||
nle = cb_result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue