~ubuntu-branches/ubuntu/karmic/uim/karmic-proposed

« back to all changes in this revision

Viewing changes to uim/uim-error.c

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2009-03-01 12:57:00 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090301125700-0ykjdq0zgj55e3n3
Tags: 1:1.5.5-1
New upstream release and final upload by current maintainter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
3
 
  Copyright (c) 2007-2008 uim Project http://code.google.com/p/uim/
 
3
  Copyright (c) 2007-2009 uim Project http://code.google.com/p/uim/
4
4
 
5
5
  All rights reserved.
6
6
 
187
187
void *
188
188
uim_realloc(void *p, size_t size)
189
189
{
190
 
  p = realloc(p, size);
191
 
  if (!p)
 
190
  void *newp;
 
191
 
 
192
  newp = realloc(p, size);
 
193
  if (!newp) {
 
194
    free(p);
192
195
    uim_fatal_error("realloc() failed");
 
196
  }
193
197
 
194
 
  return p;
 
198
  return newp;
195
199
}
196
200
 
197
201
void *