From 62cafc7da7b8efc36aa67438d9d48dc26d33e65b Mon Sep 17 00:00:00 2001 From: makeworld <25111343+makeworld-the-better-one@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:58:36 -0400 Subject: [PATCH] Add missing return if dir fails to finalize --- core/corehttp/gateway_handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 45356271d20f..09c445e5723c 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -526,6 +526,7 @@ func (i *gatewayHandler) deleteHandler(w http.ResponseWriter, r *http.Request) { nnode, err := root.GetDirectory().GetNode() if err != nil { webError(w, "WritableGateway: failed to finalize", err, http.StatusInternalServerError) + return } ncid := nnode.Cid()