Skip to content

Commit e61577e

Browse files
committed
fix(cloudsync): avoid a crash when setting the cloudsync_set_schema to the the same previous pointer
1 parent c1513d3 commit e61577e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cloudsync.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ void cloudsync_set_auxdata (cloudsync_context *data, void *xdata) {
563563
}
564564

565565
void cloudsync_set_schema (cloudsync_context *data, const char *schema) {
566+
if (data->current_schema == schema) return;
566567
if (data->current_schema) cloudsync_memory_free(data->current_schema);
567568
data->current_schema = NULL;
568569
if (schema) data->current_schema = cloudsync_string_dup_lowercase(schema);

0 commit comments

Comments
 (0)