]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/sm_make_chunk.c
[PKT_SCHED] netem: packet corruption option
[linux-2.6-omap-h63xx.git] / net / sctp / sm_make_chunk.c
index 10e82ec2ebd3eabfbafc6ecfcf96b3577422e08e..f9573eba5c7aa2f5507c12c0ff55a75e0e700490 100644 (file)
@@ -254,8 +254,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
        aiparam.adaption_ind = htonl(sp->adaption_ind);
        sctp_addto_chunk(retval, sizeof(aiparam), &aiparam);
 nodata:
-       if (addrs.v)
-               kfree(addrs.v);
+       kfree(addrs.v);
        return retval;
 }
 
@@ -347,8 +346,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
 nomem_chunk:
        kfree(cookie);
 nomem_cookie:
-       if (addrs.v)
-               kfree(addrs.v);
+       kfree(addrs.v);
        return retval;
 }
 
@@ -554,7 +552,7 @@ struct sctp_chunk *sctp_make_datafrag_empty(struct sctp_association *asoc,
        dp.ppid   = sinfo->sinfo_ppid;
 
        /* Set the flags for an unordered send.  */
-       if (sinfo->sinfo_flags & MSG_UNORDERED) {
+       if (sinfo->sinfo_flags & SCTP_UNORDERED) {
                flags |= SCTP_DATA_UNORDERED;
                dp.ssn = 0;
        } else