mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
bsnmp: Use mkstemp when creating clients local socket
Reviewed by: harti, rew Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. X-NetApp-PR: #72 Differential Revision: https://reviews.freebsd.org/D34550
This commit is contained in:
1 parent
80c3eb7bc6
commit
81e0e7b9e3
1 file changed
+1
-1
@@ -1012,7 +1012,7 @@ open_client_local(const char *path)
|
||||
snprintf(snmp_client.local_path, sizeof(snmp_client.local_path),
|
||||
"%s", SNMP_LOCAL_PATH);
|
||||
|
||||
if (mktemp(snmp_client.local_path) == NULL) {
|
||||
if (mkstemp(snmp_client.local_path) == -1) {
|
||||
seterr(&snmp_client, "%s", strerror(errno));
|
||||
(void)close(snmp_client.fd);
|
||||
snmp_client.fd = -1;
|
||||
|
||||
Reference in new issue
Block a user