Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c9cf06

Browse files
committed
Initialize new jsonb iterator to zero
Use palloc0() instead of palloc() to create a new JsonbIterator.Otherwise, the isScalar field is sometimes not initialized. There isprobably no impact in practice, but it's cleaner this way and it avoidsfuture problems.
1 parent01deec5 commit3c9cf06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/jsonb_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ iteratorFromContainer(JsonbContainer *container, JsonbIterator *parent)
901901
{
902902
JsonbIterator*it;
903903

904-
it=palloc(sizeof(JsonbIterator));
904+
it=palloc0(sizeof(JsonbIterator));
905905
it->container=container;
906906
it->parent=parent;
907907
it->nElems=JsonContainerSize(container);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp