Changeset 988 for vendor/current/source3/intl
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/intl/lang_tdb.c
r740 r988 104 104 static int initialised; 105 105 time_t loadtime; 106 bool result = False; 106 bool result = false; 107 char *dpath = NULL; 108 char *lpath = NULL; 107 109 108 110 /* we only want to init once per process, unless given … … 131 133 return True; 132 134 133 if (asprintf(&msg_path, "%s.msg", 134 data_path((const char *)lang)) == -1) { 135 dpath = data_path(talloc_tos(), (const char *)lang); 136 if (dpath == NULL) { 137 goto done; 138 } 139 140 if (asprintf(&msg_path, "%s.msg", dpath) == -1) { 135 141 DEBUG(0, ("asprintf failed\n")); 136 142 goto done; … … 142 148 goto done; 143 149 } 144 145 if (asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang) == -1) { 150 151 lpath = lock_path("lang_"); 152 if (lpath == NULL) { 153 goto done; 154 } 155 156 if (asprintf(&path, "%s%s.tdb", lpath, lang) == -1) { 146 157 DEBUG(0, ("asprintf failed\n")); 147 158 goto done; … … 176 187 SAFE_FREE(msg_path); 177 188 SAFE_FREE(path); 189 TALLOC_FREE(lpath); 190 TALLOC_FREE(dpath); 178 191 179 192 return result; … … 238 251 { 239 252 if (!tdb) return; 240 free( (void *)msgstr);253 free(discard_const_p(void, msgstr)); 241 254 } 242 255
Note:
See TracChangeset
for help on using the changeset viewer.