Pārlūkot izejas kodu

nvc0: Fix fd leak in nvc0_create_decoder

NOTE: This is a candidate for the 9.0 and 9.1 branches.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
tags/mesa-9.2-rc1
Maarten Lankhorst pirms 12 gadiem
vecāks
revīzija
6d20c646d6
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      src/gallium/drivers/nvc0/nvc0_video.c

+ 2
- 2
src/gallium/drivers/nvc0/nvc0_video.c Parādīt failu

@@ -356,19 +356,19 @@ nvc0_create_decoder(struct pipe_context *context,
goto fw_fail;
}
r = read(fd, dec->fw_bo->map, 0x4000);
close(fd);

if (r < 0) {
fprintf(stderr, "reading firmware file %s failed: %m\n", path);
goto fw_fail;
}

if (r == 0x4000) {
close(fd);
fprintf(stderr, "firmware file %s too large!\n", path);
goto fw_fail;
}

if (r & 0xff) {
close(fd);
fprintf(stderr, "firmware file %s wrong size!\n", path);
goto fw_fail;
}

Notiek ielāde…
Atcelt
Saglabāt