Branch: Tag:

2005-12-29

2005-12-29 23:38:16 by Martin Nilsson <mani@lysator.liu.se>

malloc review

Rev: src/post_modules/GTK2/source/gdkgc.pre:1.3
Rev: src/post_modules/GTK2/source/gdkpixbuf.pre:1.8
Rev: src/post_modules/GTK2/source/gdkrectangle.pre:1.4
Rev: src/post_modules/GTK2/source/gladexml.pre:1.6
Rev: src/post_modules/GTK2/source/global.pre:1.6
Rev: src/post_modules/GTK2/source/gnomecanvas.pre:1.5
Rev: src/post_modules/GTK2/source/gobject.pre:1.5
Rev: src/post_modules/GTK2/source/gtkdatabox.pre:1.4
Rev: src/post_modules/GTK2/source/gtkliststore.pre:1.6
Rev: src/post_modules/GTK2/source/gtksourceiter.pre:1.4
Rev: src/post_modules/GTK2/source/gtksourcelanguage.pre:1.4
Rev: src/post_modules/GTK2/source/gtksourcestylescheme.pre:1.3
Rev: src/post_modules/GTK2/source/gtksourcetag.pre:1.3
Rev: src/post_modules/GTK2/source/gtktextbuffer.pre:1.6
Rev: src/post_modules/GTK2/source/gtktextiter.pre:1.7
Rev: src/post_modules/GTK2/source/gtktreemodel.inc:1.5
Rev: src/post_modules/GTK2/source/gtktreestore.pre:1.6

114:    push_text("default"); push_int(gs->is_default);    push_text("mask"); push_int(gs->mask);    fg=(GdkColor *)g_malloc(sizeof(GdkColor)); +  if (fg==NULL) +  SIMPLE_OUT_OF_MEMORY_ERROR("get_tag_style",sizeof(GdkColor));    bg=(GdkColor *)g_malloc(sizeof(GdkColor)); -  if (fg==NULL || bg==NULL) -  SIMPLE_OUT_OF_MEMORY_ERROR("get_style",sizeof(GdkColor)); +  if (bg==NULL) +  SIMPLE_OUT_OF_MEMORY_ERROR("get_tag_style",sizeof(GdkColor));    *fg=gs->foreground;    *bg=gs->background;    push_text("foreground"); push_gdkobject(fg,color);
201:    push_text("default"); push_int(gs->is_default);    push_text("mask"); push_int(gs->mask);    fg=(GdkColor *)g_malloc(sizeof(GdkColor)); +  if (fg==NULL) +  SIMPLE_OUT_OF_MEMORY_ERROR("get_tag_default_style",sizeof(GdkColor));    bg=(GdkColor *)g_malloc(sizeof(GdkColor)); -  if (fg==NULL || bg==NULL) -  SIMPLE_OUT_OF_MEMORY_ERROR("get_style",sizeof(GdkColor)); +  if (bg==NULL) +  SIMPLE_OUT_OF_MEMORY_ERROR("get_tag_default_style",sizeof(GdkColor));    *fg=gs->foreground;    *bg=gs->background;    push_text("foreground"); push_gdkobject(fg,color);