Skip to content

Commit

Permalink
Merge pull request #5 from SINTEF/fixed-segfault-in-postgresql-test
Browse files Browse the repository at this point in the history
Fixed segfault in postgresql storage test
  • Loading branch information
jesper-friis authored Apr 7, 2020
2 parents bb1a1b3 + 4097b9b commit 4b5f068
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions storages/python/tests/test_postgresql_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ MU_TEST(test_load)
MU_TEST(test_iter)
{
char uuid[DLITE_UUID_LENGTH+1];
void *si = dlite_storage_iter_create(db, NULL);
mu_check(si);
printf("\n");
while (dlite_storage_iter_next(db, si, uuid) == 0)
printf(" - uuid: %s\n", uuid);
dlite_storage_iter_free(db, si);
if (db) {
void *si = dlite_storage_iter_create(db, NULL);
mu_check(si);
printf("\n");
while (dlite_storage_iter_next(db, si, uuid) == 0)
printf(" - uuid: %s\n", uuid);
dlite_storage_iter_free(db, si);
}
}


Expand Down

0 comments on commit 4b5f068

Please sign in to comment.