[asterisk-commits] rizzo: trunk r48086 - /trunk/main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Nov 28 08:53:12 MST 2006


Author: rizzo
Date: Tue Nov 28 09:53:12 2006
New Revision: 48086

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48086
Log:
initialize the dynamic string in a sane way.


Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=48086&r1=48085&r2=48086
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Nov 28 09:53:12 2006
@@ -2770,7 +2770,7 @@
 		/* always return something even if len == 0 */
 		if ((buf = ast_calloc(1, len+1))) {
 			if (!s->outputstr)
-				s->outputstr = ast_calloc(1, sizeof(*s->outputstr));
+				s->outputstr = ast_dynamic_str_create(len+1);
 			if (len > 0 && s->outputstr) {
 				lseek(s->fd, 0, SEEK_SET);
 				read(s->fd, buf, len);



More information about the asterisk-commits mailing list