Update version for release
[tftp-hpa.git] / lib / xstrdup.c
blob036b3b29fd78a0fe1fd28928474c3105b2575385
1 /*
2 * xstrdup.c
4 * Simple error-checking version of strdup()
6 */
8 #include "config.h"
10 char *xstrdup(const char *s)
12 char *p = strdup(s);
14 if ( !p ) {
15 fprintf(stderr, "Out of memory!\n");
16 exit(128);
19 return p;