Changeset 17702
- Timestamp:
- 09/28/11 17:46:43 (21 months ago)
- File:
-
- 1 edited
-
src/router/libutils/mac80211regulatory.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/libutils/mac80211regulatory.c
r15973 r17702 169 169 if (db == MAP_FAILED) { 170 170 perror("failed to mmap db file"); 171 if (fd) close(fd); 171 172 return rd; 172 173 } … … 177 178 if (ntohl(header->magic) != REGDB_MAGIC) { 178 179 fprintf(stderr, "Invalid database magic\n"); 179 return rd;180 goto out; 180 181 } 181 182 182 183 if (ntohl(header->version) != REGDB_VERSION) { 183 184 fprintf(stderr, "Invalid database version\n"); 184 return rd;185 goto out; 185 186 } 186 187 … … 191 192 if (dblen <= (int)sizeof(*header)) { 192 193 fprintf(stderr, "Invalid signature length %d\n", siglen); 193 return rd;194 goto out; 194 195 } 195 196 … … 209 210 if (!found_country) { 210 211 fprintf(stderr, "No country match in regulatory database.\n"); 211 return rd;212 goto out; 212 213 } 213 214 rd = country2rd(db, dblen, country); 215 out: 216 if (munmap(db, dblen+siglen) == -1) { 217 fprintf(stderr, "mac80211regulatory failed to munmap crda database\n"); 218 } 219 if (fd) close(fd); 214 220 return rd; 215 221 }
Note: See TracChangeset
for help on using the changeset viewer.
