svnno****@sourc*****
svnno****@sourc*****
2011年 3月 17日 (木) 16:33:16 JST
Revision: 435 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=435 Author: yoya Date: 2011-03-17 16:33:15 +0900 (Thu, 17 Mar 2011) Log Message: ----------- calloc 直後のエラーで free するのを、エラーの後で calloc するよう変更 Modified Paths: -------------- trunk/src/swf_tag.c -------------- next part -------------- Modified: trunk/src/swf_tag.c =================================================================== --- trunk/src/swf_tag.c 2011-03-17 07:11:26 UTC (rev 434) +++ trunk/src/swf_tag.c 2011-03-17 07:33:15 UTC (rev 435) @@ -84,13 +84,12 @@ fprintf(stderr, "swf_tag_create: bs == NULL\n"); return NULL; } - tag = calloc(sizeof(*tag), 1); tag_and_length = bitstream_getbytesLE(bs, 2); if (tag_and_length == (unsigned short) -1) { fprintf(stderr, "swf_tag_create: tag_and_length(short) == -1\n"); - free(tag); return NULL; } + tag = calloc(sizeof(*tag), 1); tag->tag = tag_and_length >> 6; tag->length = tag_and_length & 0x3f; tag->length_longformat = 0;