Skip to content

Commit 168ac24

Browse files
committed
File close must be in block that checked for NULL.
1 parent c1a9363 commit 168ac24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/emc/usr_intf/emcsh.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3212,8 +3212,8 @@ static int emc_pendant(ClientData /*clientdata*/,
32123212
inBytes[4] = fgetc(inFile); // Status byte
32133213
inBytes[2] = fgetc(inFile); // Horizontal movement
32143214
inBytes[3] = fgetc(inFile); // Vertical Movement
3215+
fclose(inFile);
32153216
}
3216-
fclose(inFile);
32173217

32183218
if (!strcmp(port, "/dev/psaux")) { // For PS/2
32193219
inBytes[0] = (inBytes[4] & 0x01); // Left button

0 commit comments

Comments
 (0)