Skip to content

Commit b3a093e

Browse files
julienschmidtBrigitte Lamarche
authored and
Brigitte Lamarche
committed
packets: do not call function on nulled value (go-sql-driver#678)
1 parent f74faed commit b3a093e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packets.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1155,10 +1155,11 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
11551155
}
11561156
return io.EOF
11571157
}
1158+
mc := rows.mc
11581159
rows.mc = nil
11591160

11601161
// Error otherwise
1161-
return rows.mc.handleErrorPacket(data)
1162+
return mc.handleErrorPacket(data)
11621163
}
11631164

11641165
// NULL-bitmap, [(column-count + 7 + 2) / 8 bytes]

0 commit comments

Comments
 (0)