Public bug reported:

Description:    Ubuntu 16.04 LTS
Release:        16.04


get_uid in libmultipath appears to be leaking memory on the error path.

1553                 if (len <= 0 &&
1554                     !strcmp(pp->uid_attribute, DEFAULT_UID_ATTRIBUTE)) {
1555                         len = get_vpd_uid(pp);
1556                         origin = "sysfs";
1557                         pp->uid_attribute = NULL;
1558                         if (len < 0) {
1559                                 condlog(1, "%s: failed to get sysfs uid: 
%s %d",
1560                                         pp->dev, strerror(-len), line);
1561                                 len = get_vpd_sgio(pp->fd, 0x83, pp->wwid,
1562                                                    WWID_SIZE);
1563                                 origin = "sgio";
1564                         }
1565                 }

Line 1557 resets the uid_attribute to NULL after it was successfully
compared at line 1554 but it doesn't free the pointer fist.

** Affects: multipath-tools (Ubuntu)
     Importance: Undecided
     Assignee: Dragan S. (dragan-s)
         Status: New

** Changed in: multipath-tools (Ubuntu)
     Assignee: (unassigned) => Dragan S. (dragan-s)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1592999

Title:
  memory leak in libmultipath

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1592999/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to