]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: free temporary variable before return
authorKarel Zak <kzak@redhat.com>
Thu, 2 May 2024 11:14:17 +0000 (13:14 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 2 May 2024 11:14:17 +0000 (13:14 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock-rtc.c

index 113d4e8ca5772abf368782b720bc758d01f4641b..659a7a707b406401198741dea45ff27b258927fe 100644 (file)
@@ -505,7 +505,7 @@ int set_param_rtc(const struct hwclock_control *ctl, const char *opt0)
        rtc_fd = open_rtc(ctl);
        if (rtc_fd < 0) {
                warnx(_("cannot open %s"), rtc_dev_name);
-               return 1;
+               goto done;
        }
 
        if (ioctl(rtc_fd, RTC_PARAM_SET, &param) == -1) {