1 /* |
1 /* |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 * |
3 * |
4 * Copyright 2013 Olaf Wintermann. All rights reserved. |
4 * Copyright 2015 Olaf Wintermann. All rights reserved. |
5 * |
5 * |
6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright |
9 * 1. Redistributions of source code must retain the above copyright |
204 value = sstrdup_a(map->allocator, value); |
204 value = sstrdup_a(map->allocator, value); |
205 if(!value.ptr) { |
205 if(!value.ptr) { |
206 return 1; |
206 return 1; |
207 } |
207 } |
208 if(ucx_map_sstr_put(map, name, value.ptr)) { |
208 if(ucx_map_sstr_put(map, name, value.ptr)) { |
209 map->allocator->free(map->allocator->pool, value.ptr); |
209 alfree(map->allocator, value.ptr); |
210 return 1; |
210 return 1; |
211 } |
211 } |
212 } |
212 } |
213 if (parser->error) { |
213 if (parser->error) { |
214 return parser->error; |
214 return parser->error; |