~ubuntu-branches/ubuntu/vivid/pgpool2/vivid

« back to all changes in this revision

Viewing changes to pool_relcache.c

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2014-10-15 21:36:17 UTC
  • mfrom: (15.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20141015213617-opxy1fvj2im734tw
Tags: 3.3.4-1
* New upstream release.
* Remove test patches that no longer apply.
* Skip installcheck test on 8.4/9.0.
* Add systemd service file, initial patch by Michael Stapelberg, thanks!
  Closes: #756453.

Show diffs side-by-side

added added

removed removed

Lines of Context:
262
262
 
263
263
void *string_register_func(POOL_SELECT_RESULT *res)
264
264
{
265
 
        char    *ret = NULL;
266
 
        int              i;
267
 
 
268
 
        if (res->numrows == 0)
269
 
                return NULL;
270
 
 
271
 
        for (i = 0; i < res->numrows; i++)
272
 
        {
273
 
                ret = strdup(res->data[i]);
274
 
                break;
275
 
        }
276
 
 
277
 
        return (void *)ret;
 
265
        return (res->numrows > 0)? strdup(res->data[0]): NULL;
278
266
}
279
267
 
280
268
void *string_unregister_func(void *data)
281
269
{
282
 
        free(data);
283
 
        return data;
 
270
    if(data)
 
271
            free(data);
 
272
    return (void *)0;
284
273
}