Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion StdLib/BsdSocketLib/res_mkupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,12 @@ res_mkupdrec(int section, const char *dname,
u_int class, u_int type, u_long ttl) {
ns_updrec *rrecp = (ns_updrec *)calloc(1, sizeof(ns_updrec));

if (!rrecp || !(rrecp->r_dname = strdup(dname)))
if (!rrecp)
return (NULL);
if (!(rrecp->r_dname = strdup(dname))) {
free(rrecp);
return (NULL);
}
rrecp->r_class = (u_int16_t)class;
rrecp->r_type = (u_int16_t)type;
rrecp->r_ttl = (u_int32_t)ttl;
Expand Down
2 changes: 1 addition & 1 deletion StdLib/LibC/Stdio/vsnprintf_ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ vsnprintf_ss(char *sbuf, size_t slen, const char *fmt0, va_list ap)
static const char xdigs_upper[16] = "0123456789ABCDEF";


_DIAGASSERT(n == 0 || sbuf != NULL);
_DIAGASSERT(sbuf != NULL);
_DIAGASSERT(fmt != NULL);

tailp = sbuf + slen;
Expand Down