summaryrefslogtreecommitdiff
path: root/vendor/github.com/goccy/go-json/internal/decoder/ptr.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/goccy/go-json/internal/decoder/ptr.go')
-rw-r--r--vendor/github.com/goccy/go-json/internal/decoder/ptr.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/vendor/github.com/goccy/go-json/internal/decoder/ptr.go b/vendor/github.com/goccy/go-json/internal/decoder/ptr.go
index de12e105c..ae2299466 100644
--- a/vendor/github.com/goccy/go-json/internal/decoder/ptr.go
+++ b/vendor/github.com/goccy/go-json/internal/decoder/ptr.go
@@ -85,6 +85,7 @@ func (d *ptrDecoder) Decode(ctx *RuntimeContext, cursor, depth int64, p unsafe.P
}
c, err := d.dec.Decode(ctx, cursor, depth, newptr)
if err != nil {
+ *(*unsafe.Pointer)(p) = nil
return 0, err
}
cursor = c