Changeset 467 for trunk/wifidog/src/util.c
- Timestamp:
- 02/20/05 16:29:15 (8 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog/src/util.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/src/util.c
r451 r467 46 46 #include <netdb.h> 47 47 48 #include "safe.h" 48 49 #include "util.h" 49 50 #include "conf.h" … … 101 102 /* XXX Calling function is reponsible for free() */ 102 103 103 h_addr = (struct in_addr *)malloc(sizeof(struct in_addr)); 104 105 if (h_addr == NULL) { 106 debug(LOG_CRIT, "Failed to allocate memory for in_addr"); 107 exit(1); 108 } 104 h_addr = safe_malloc(sizeof(struct in_addr)); 109 105 110 106 LOCK_GHBN(); … … 154 150 155 151 ip_str = (char *)inet_ntoa(in); 156 return s trdup(ip_str);152 return safe_strdup(ip_str); 157 153 } 158 154
