:registry/mdns: fix nil pointer bug (#1818)

This commit is contained in:
ben-toogood 2020-07-10 17:47:07 +01:00 committed by GitHub
parent 09ec20fded
commit 13ea0eec02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,10 +120,10 @@ func decode(record []string) (*mdnsTxt, error) {
br := bytes.NewReader(hr)
zr, err := zlib.NewReader(br)
defer zr.Close()
if err != nil {
return nil, err
}
defer zr.Close()
rbuf, err := ioutil.ReadAll(zr)
if err != nil {