File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ jsonb_subscript_assign(ExprState *state,
283
283
*/
284
284
if (* op -> resnull )
285
285
{
286
- JsonbValue * newSource = ( JsonbValue * ) palloc ( sizeof ( JsonbValue )) ;
286
+ JsonbValue newSource ;
287
287
288
288
/*
289
289
* To avoid any surprising results, set up an empty jsonb array in
@@ -292,17 +292,17 @@ jsonb_subscript_assign(ExprState *state,
292
292
*/
293
293
if (workspace -> expectArray )
294
294
{
295
- newSource -> type = jbvArray ;
296
- newSource -> val .array .nElems = 0 ;
297
- newSource -> val .array .rawScalar = false;
295
+ newSource . type = jbvArray ;
296
+ newSource . val .array .nElems = 0 ;
297
+ newSource . val .array .rawScalar = false;
298
298
}
299
299
else
300
300
{
301
- newSource -> type = jbvObject ;
302
- newSource -> val .object .nPairs = 0 ;
301
+ newSource . type = jbvObject ;
302
+ newSource . val .object .nPairs = 0 ;
303
303
}
304
304
305
- jsonbSource = JsonbValueToJsonb (newSource );
305
+ jsonbSource = JsonbValueToJsonb (& newSource );
306
306
* op -> resnull = false;
307
307
}
308
308
else
You can’t perform that action at this time.
0 commit comments