*/
#include <h/mh.h>
+#include <h/utils.h>
#include <pwd.h>
#include <errno.h>
switch(t) {
case LOGIN:
if (token() && *aname == 0) {
- *aname = malloc((size_t) strlen(tokval) + 1);
+ *aname = mh_xmalloc((size_t) strlen(tokval) + 1);
strcpy(*aname, tokval);
}
break;
goto bad;
}
if (token() && *apass == 0) {
- *apass = malloc((size_t) strlen(tokval) + 1);
+ *apass = mh_xmalloc((size_t) strlen(tokval) + 1);
strcpy(*apass, tokval);
}
break;
myname = tmp;
}
- *aname = malloc((size_t) strlen(myname) + 1);
+ *aname = mh_xmalloc((size_t) strlen(myname) + 1);
strcpy (*aname, myname);
}
mypass = *aname;
}
- *apass = malloc((size_t) strlen(mypass) + 1);
+ *apass = mh_xmalloc((size_t) strlen(mypass) + 1);
strcpy (*apass, mypass);
}