During the implementation of the command zos in r2 (save zigns), it's been found that syncing from mem to file was buggy. Current workaround:
Sdb *db = sdb_new (NULL, file, 0);
if (!db) {
return false;
}
sdb_merge (db, a->sdb_zigns);
retval = sdb_sync (db);
sdb_close (db);
sdb_free (db);