[Asterisk-code-review] stringfields: Refactor to allow fields to be added to the e... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Apr 4 18:58:08 CDT 2016


Richard Mudgett has posted comments on this change.

Change subject: stringfields:  Refactor to allow fields to be added to the end of structures
......................................................................


Patch Set 8: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/2477/8/include/asterisk/stringfields.h
File include/asterisk/stringfields.h:

PS8, Line 381: 	__ast_string_field_free_memory(&(x)->__field_mgr, &(x)->__field_mgr_pool, \
             : 				AST_STRINGFIELD_DESTROY, __FILE__, __LINE__, __PRETTY_FUNCTION__);
Ugh.  You lost the NULL tolerance which is something the unit test will crash on in an off nominal failure condition. (string_field_aggregate_test() inst1 - inst4)


https://gerrit.asterisk.org/#/c/2477/8/tests/test_stringfields.c
File tests/test_stringfields.c:

PS8, Line 504: 	ast_string_field_free_memory(inst1);
             : 	ast_string_field_free_memory(inst2);
             : 	ast_string_field_free_memory(inst3);
             : 	ast_string_field_free_memory(inst4);
You have to manually free inst1 thru inst4 like everywhere else.


-- 
To view, visit https://gerrit.asterisk.org/2477
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I235db338c5b178f5a13b7946afbaa5d4a0f91d61
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list