From abf20c6dea2f8f66cc1f8461660b2cff74784ee3 Mon Sep 17 00:00:00 2001 From: Stanislav Chzhen Date: Mon, 25 Dec 2023 13:48:44 +0300 Subject: [PATCH] Pull request 2116: fix-nil-deref Squashed commit of the following: commit bf6cfdb4e2315dc6826daa4c83aef5e961b86ddc Merge: 3c532f508 4bc5c346a Author: Stanislav Chzhen Date: Mon Dec 25 13:35:45 2023 +0300 Merge branch 'master' into fix-nil-deref commit 3c532f50876f3d04c63e1377b1143f2436fd37f2 Author: Stanislav Chzhen Date: Wed Dec 20 13:59:29 2023 +0300 home: fix nil deref --- internal/home/clientshttp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/home/clientshttp.go b/internal/home/clientshttp.go index 20d6080f..0bbdea9c 100644 --- a/internal/home/clientshttp.go +++ b/internal/home/clientshttp.go @@ -378,6 +378,8 @@ func (clients *clientsContainer) handleUpdateClient(w http.ResponseWriter, r *ht if !ok { aghhttp.Error(r, w, http.StatusBadRequest, "client not found") + + return } c, err := clients.jsonToClient(dj.Data, prev)