X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=osl.c;h=66661969e3720193d7f7af4c5295ee02d8db13d5;hb=995d35b6530fc34e706f492bf356c4415d4ac503;hp=c6959acc0780144715f5a201c599380fcb9f4108;hpb=20a76169066eaf33b279e0f322415ea4b4c2899e;p=osl.git diff --git a/osl.c b/osl.c index c6959ac..6666196 100644 --- a/osl.c +++ b/osl.c @@ -1572,7 +1572,8 @@ __export int osl_update_object(struct osl_table *t, const struct osl_row *r, } remove_rb_node(t, col_num, r); if (cd->storage_type == OSL_NO_STORAGE) { /* TODO: If fixed size, reuse object? */ - free(r->volatile_objects[col->volatile_num].data); + if (!(cd->storage_flags & OSL_DONT_FREE)) + free(r->volatile_objects[col->volatile_num].data); r->volatile_objects[col->volatile_num] = *obj; } else if (cd->storage_type == OSL_DISK_STORAGE) { char *ds_name; @@ -1701,6 +1702,7 @@ __export int osl_get_nth_row(const struct osl_table *t, unsigned col_num, unsigned num_rows; int ret; + *result = NULL; if (n == 0) return -E_OSL_RB_KEY_NOT_FOUND; ret = osl_get_num_rows(t, &num_rows);