[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libsemanage: fix apparent typo


This patch fixes a bug found by Coverity in libsemanage:

	Seems to be a typo: arg instead of targ.  In every other
	case in this switch, we do

		if ((targ = fn()) == NULL) {
			goto cleanup;
		}  else {
			arg = targ;
		}

	Except in the default case it was:

		if ((arg = fn()) == NULL) {
			goto cleanup;
		}  else {
			arg = targ;
		}

Index: src/commit_api.c
===================================================================
--- src.orig/commit_api.c
+++ src/commit_api.c
@@ -637,7 +637,7 @@ static char **split_args (char *arg0, ch
                                 break;
                         }
                         default: {
-                                if ((arg = append (arg, *s)) == NULL) {
+                                if ((targ = append (arg, *s)) == NULL) {
                                         goto cleanup;
                                 }
                                 else {

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


This mailing list archive is a service of Copilot Consulting.