Check error returns from strupper_m() (in all reasonable places).
[samba.git] / source3 / passdb / lookup_sid.c
index 8e14cec3e8193d2f316eebaf30d5f7ba0e6c96df..a2d793feb32157eb4939a76ac337b134cca78e66 100644 (file)
@@ -339,7 +339,10 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
                        TALLOC_FREE(tmp_ctx);
                        return false;
                }
-               strupper_m(tmp_dom);
+               if (!strupper_m(tmp_dom)) {
+                       TALLOC_FREE(tmp_ctx);
+                       return false;
+               }
                *ret_domain = tmp_dom;
        }