Skip to content

Commit

Permalink
stored: removed a potential memory leak
Browse files Browse the repository at this point in the history
- free memory that variable status points to when it goes out of scope
- Coverity: CID 1480528
  • Loading branch information
franku committed May 27, 2019
1 parent 8ce3fdf commit 657f307
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/stored/backends/generic_tape_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,7 @@ char* generic_tape_device::StatusDev()
dev_errno = errno;
Mmsg2(errmsg, _("ioctl MTIOCGET error on %s. ERR=%s.\n"), print_name(),
be.bstrerror());
free(status);
return 0;
}
Pmsg0(-20, _(" Device status:"));
Expand Down

0 comments on commit 657f307

Please sign in to comment.