hdparm/hdparm-leak-fix.patch
Michal Seben e939e94c00 Accepting request 34520 from home:mseben:branches:Base:System
Copy from home:mseben:branches:Base:System/hdparm via accept of submit request 34520 revision 4.
Request was accepted with message:

OBS-URL: https://build.opensuse.org/request/show/34520
OBS-URL: https://build.opensuse.org/package/show/Base:System/hdparm?expand=0&rev=14
2010-03-10 16:55:38 +00:00

21 lines
488 B
Diff

--- hdparm.c.old 2009-08-02 22:08:56.000000000 +0200
+++ hdparm.c 2009-09-17 09:57:44.000000000 +0200
@@ -880,7 +880,7 @@
{
__u64 start_lba;
int i, err, shortened = 0;
- char *fdevname = strdup(devname);
+ char *fdevname = strdupa(devname);
err = get_dev_geometry(fd, NULL, NULL, NULL, &start_lba, NULL);
if (err)
@@ -891,7 +891,7 @@
}
if (!shortened)
- fdevname = strdup("the full disk");
+ fdevname = strdupa("the full disk");
if (start_lba == 0ULL)
return 0;