diff --git a/NEWS b/NEWS
index 7ede65ea8f9e8551c1709a4ee4049d23d1063f09..2a0bc5fb3cfa2ca910b9dff40c0934ec7d5b116f 100644
--- a/NEWS
+++ b/NEWS
@@ -89,6 +89,8 @@ documents those changes that are of interest to users and admins.
     is already running.
  -- Email messages for job array events print now use the job ID using the
     format "#_# (#)" rather than just the internal job ID.
+ -- Set the number of free licenses to be 0 if the global license count decreases
+    and total is less than in use.
 
 * Changes in Slurm 14.03.3-2
 ============================
diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c
index 969ed3f0ff287d065070fcf670d425c1f2cf0f65..d06745ab90abfb74b89defc91dbc7c409c930904 100644
--- a/src/common/slurm_protocol_pack.c
+++ b/src/common/slurm_protocol_pack.c
@@ -11834,10 +11834,15 @@ _unpack_license_info_msg(license_info_msg_t **msg,
 					       &zz, buffer);
 			safe_unpack32(&((*msg)->lic_array[i]).total, buffer);
 			safe_unpack32(&((*msg)->lic_array[i]).in_use, buffer);
-			(*msg)->lic_array[i].available =
-				(*msg)->lic_array[i].total -
-				(*msg)->lic_array[i].in_use;
-			xassert((*msg)->lic_array[i].available >= 0);
+			/* The total number of licenses can decrease
+			 * at runtime.
+			 */
+			if ((*msg)->lic_array[i].total < (*msg)->lic_array[i].in_use)
+				(*msg)->lic_array[i].available = 0;
+			else
+				(*msg)->lic_array[i].available =
+					(*msg)->lic_array[i].total -
+					(*msg)->lic_array[i].in_use;
 			safe_unpack8(&((*msg)->lic_array[i]).remote, buffer);
 		}