Skip to content

translate_proc_pid_maps checks wrong file descriptor for error #154

@SamHerts

Description

@SamHerts

Bug: translate_proc_pid_maps checks fd instead of newfd for errors and closes fd on error.

newfd = open_replacement_proc_maps(spindle_dir, pid, output_file, output_file_size);
if (fd == -1) {
close(fd);
return -1;
}

Fix:

newfd = open_replacement_proc_maps(spindle_dir, pid, output_file, output_file_size); 
if (newfd == -1) { 
  close(newfd); 
  return -1; 
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions