Since the array `profiles` is set to use `strdup()` as a copy function, we
don't have to use `strdup()` on the element which is passed as parameter
of `cupsArrayAdd()` - using the `strdup()` as we used till now causes
memory leak.
Reproducer is the same as https://github.com/OpenPrinting/cups/pull/813
.
- Fixed extensive looping in scheduler (Issue #604)
- Fixed hanging of `lpstat` on IBM AIX (Issue #773)
- Fixed hanging of `lpstat` on Solaris (Issue #156)
+- Fixed memory leak when creating color profiles
- Fixed segfault in `cupsGetNamedDest()` when trying to get default printer, but
the default printer is not set (Issue #719)
- Fixed RFC 1179 port reserving behavior in LPD backend (Issue #743)
dbus_message_iter_get_basic(&args, &profile_path);
cupsdLogMessage(CUPSD_LOG_DEBUG, "Created profile \"%s\".", profile_path);
- cupsArrayAdd(profiles, strdup(profile_path));
+ cupsArrayAdd(profiles, profile_path);
out: